Integer<T>DescriptionA type fulfills the requirements of an Integer if it has the
properties of a integer.More specifically, a type T is Integer if there exists a
specialization of std::numeric_limits<T> for which
std::numeric_limits<T>::is_integer is equal to
true. See the documentation for standard library class
numeric_limits. The standard library includes such
specializations for all built-in numeric types. Note that this concept is
distinct from the C++ standard library type traits
is_integral and is_arithmetic. These latter
fulfill the requirements of the concept Numeric. But there are types which
fulfill this concept for which is_arithmetic<T>::value ==
false. For example see safe<int>.Refinement ofNumericNotationT, U, VA type that is a model of the Integert, uAn object of type modeling IntegerValid ExpressionsIn addition to the expressions defined in Numeric the following expressions
must be valid.
ExpressionReturn TypeSemantics~tTbitwise complementt << uTshift t left u bitst >> uTshift t right by u bitst & uVand of t and u padded out to max # bits in t, ut | uVor of t and u padded out to max # bits in t, ut ^ uVexclusive or of t and u padded out to max # bits in t,
ut <<= uTleft shift the value of t by u bitst >>= uTright shift the value of t by u bitst &= uTand the value of t with u and assign to tt |= uTor the value of t with u and assign to tt ^= uTexclusive or the value of t with u and assign to
tModelsint, safe<int>, safe_unsigned_range<0, 11>,
checked_result<int> etc.Header#include
<boost/safe_numerics/concepts/integer.hpp>