1 .. Data Types/Numeric//char_ |60
24 An |Integral Constant| wrapper for ``char``.
32 #include <boost/mpl/char.hpp>
44 +---------------+-------------------------------+---------------------------+
45 | Parameter | Requirement | Description |
46 +===============+===============================+===========================+
47 | ``N`` | A character constant | A value to wrap. |
48 +---------------+-------------------------------+---------------------------+
53 |Semantics disclaimer...| |Integral Constant|.
55 For arbitrary character constant ``c``:
57 +-------------------+-----------------------------------------------------------+
58 | Expression | Semantics |
59 +===================+===========================================================+
60 | ``char_<c>`` | An |Integral Constant| ``x`` such that ``x::value == c`` |
61 | | and ``x::value_type`` is identical to ``char``. |
62 +-------------------+-----------------------------------------------------------+
72 BOOST_MPL_ASSERT(( is_same< c::value_type, char > ));
73 BOOST_MPL_ASSERT(( is_same< c::type, c > ));
74 BOOST_MPL_ASSERT(( is_same< next< c >::type, char_<'d'> > ));
75 BOOST_MPL_ASSERT(( is_same< prior< c >::type, char_<'b'> > ));
76 BOOST_MPL_ASSERT_RELATION( (c::value), ==, 'c' );
83 |Data Types|, |Integral Constant|, |int_|, |size_t|, |integral_c|
86 .. copyright:: Copyright © 2009 Eric Niebler
87 Distributed under the Boost Software License, Version 1.0. (See accompanying
88 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)