Back to Arangodb

char_

3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/char.html

3.12.9.12.4 KB
Original Source

| Prev Next | Back Along | Up Home | Full TOC | Front Page / Data Types / Numeric / char_ |

char_

Synopsis

template<
      char N
    >
struct[char\_](./char.html){
    //_unspecified_// ...
};

Description

An Integral Constant wrapper for char.

#include <[boost/mpl/char.hpp](../../../../boost/mpl/char.hpp)>

Model of

Integral Constant

Parameters

ParameterRequirementDescription
NA character constantA value to wrap.

Expression semantics

The semantics of an expression are defined only where they differ from, or are not defined in Integral Constant.

For arbitrary character constant c:

ExpressionSemantics
char_<c>An Integral Constant x such that x::value == c and x::value_type is identical to char.

Example

typedef[char\_](./char.html)<'c'> c;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< c::[value\_type](./value-type.html), char > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same< c::type, c > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[next](./next.html)< c >::type,[char\_](./char.html)<'d'> > ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[prior](./prior.html)< c >::type,[char\_](./char.html)<'b'> > ));[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( (c::value), ==, 'c' );
assert( c() == 'c' );

See also

Data Types, Integral Constant, int_, size_t, integral_c

| Prev Next | Back Along | Up Home | Full TOC |

Copyright © 2009 Eric Niebler Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |