|
| bounded_int (const bounded_int &)=default |
|
| bounded_int (bounded_int &&)=default |
|
template<typename ArgT = T> |
| bounded_int (ArgT, typename std::enable_if< std::is_integral< ArgT >::value==false &&std::is_convertible< ArgT, T >::value==false >::type *=0) |
|
template<typename ArgT = T> |
| bounded_int (ArgT val, typename std::enable_if< std::is_integral< ArgT >::value==false &&std::is_convertible< ArgT, T >::value==true >::type *=0) |
|
template<typename ArgT = T> |
| bounded_int (ArgT val, typename std::enable_if< std::is_integral< ArgT >::value &&std::is_signed< ArgT >::value!=std::is_signed< T >::value >::type *=0) |
|
template<typename ArgT = T> |
| bounded_int (ArgT val, typename std::enable_if< std::is_integral< ArgT >::value &&(sizeof(ArgT)<=sizeof(T)) &&std::is_signed< ArgT >::value==std::is_signed< T >::value >::type *=0) |
|
template<typename ArgT = T> |
| bounded_int (ArgT val, typename std::enable_if< std::is_integral< ArgT >::value &&(sizeof(ArgT) > sizeof(T)) &&std::is_signed< ArgT >::value==std::is_signed< T >::value >::type *=0) |
|
template<typename ArgT > |
void | rangeCheck_ (ArgT val) |
|
template<typename ArgT = T> |
std::enable_if< std::numeric_limits< ArgT >::min()!=min_bound, void >::type | lowerRangeCheck_ (ArgT val) const |
|
template<typename ArgT = T> |
std::enable_if< std::numeric_limits< ArgT >::min()==min_bound, void >::type | lowerRangeCheck_ (ArgT val) const |
|
template<typename ArgT = T> |
std::enable_if< std::numeric_limits< ArgT >::max()!=max_bound, void >::type | upperRangeCheck_ (ArgT val) const |
|
template<typename ArgT = T> |
std::enable_if< std::numeric_limits< ArgT >::max()==max_bound, void >::type | upperRangeCheck_ (ArgT val) const |
|
| operator T () const |
| Cast to the held type.
|
|
bool | operator== (const bounded_int &)=delete |
| Deleted comaprison with bounded in (until implemented fully)
|
|
bool | operator= (const bounded_int &)=delete |
| Deleted comaprison with bounded in (until implemented fully)
|
|
template<typename T, T min_bound = std::numeric_limits<T>::min(), T max_bound = std::numeric_limits<T>::max()>
class sparta::bounded_int< T, min_bound, max_bound >
Bounded integer type with range-checking.
- Template Parameters
-
T | type to hold |
min_bound | Minimum bound (inclusive) |
max_bound | Maximum bound (inclusive) |
Definition at line 583 of file Utils.hpp.