Front Page / Data Types / Numeric / size_t |
An Integral Constant wrapper for std::size_t.
#include <boost/mpl/size_t.hpp>
Parameter | Requirement | Description |
---|---|---|
N | An integral constant | A value to wrap. |
The semantics of an expression are defined only where they differ from, or are not defined in Integral Constant.
For arbitrary integral constant n:
Expression | Semantics |
---|---|
size_t<c> | An Integral Constant x such that x::value == c and x::value_type is identical to std::size_t. |
typedef size_t<8> eight; BOOST_MPL_ASSERT(( is_same< eight::value_type, std::size_t > )); BOOST_MPL_ASSERT(( is_same< eight::type, eight > )); BOOST_MPL_ASSERT(( is_same< next< eight >::type, size_t<9> > )); BOOST_MPL_ASSERT(( is_same< prior< eight >::type, size_t<7> > )); BOOST_MPL_ASSERT_RELATION( (eight::value), ==, 8 ); assert( eight() == 8 );