| Front Page / Metafunctions / String Operations / c_str |
template<
typename Sequence
>
struct c_str
{
typedef unspecified type;
static char const value[];
};
c_str converts the Forward Sequence of Integral Constants Sequence into a null-terminated byte string containing an equivalent sequence.
#include <boost/mpl/string.hpp>
| Parameter | Requirement | Description |
|---|---|---|
| Sequence | Forward Sequence of Integral Constants | A sequence to be converted into a null-terminated byte string. |
For any Forward Sequence of Integral Constants s,
c_str<s>::value;
| Return type: | A null-terminated byte string. |
|---|---|
| Precondition: | size<s>::value <= BOOST_MPL_STRING_MAX_LENGTH. |
| Semantics: | Equivalent to
char const value[] = {
at<s, 0>::type::value
, ...
, at<s, size<s>::value-1>::type::value
, '\0'
};
|
| Sequence archetype | Complexity |
|---|---|
| Forward Sequence | Linear. |