diff --git a/doc/refmanual/c-str.html b/doc/refmanual/c-str.html new file mode 100644 index 0000000..1bfba1e --- /dev/null +++ b/doc/refmanual/c-str.html @@ -0,0 +1,137 @@ + + + +
+ + ++ | 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. | +
+ |
+ | Front Page / Data Types / Numeric / char_ | +
An Integral Constant wrapper for char.
++#include <boost/mpl/char.hpp> ++
Parameter | +Requirement | +Description | +
---|---|---|
N | +A character 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 character constant c:
+Expression | +Semantics | +
---|---|
char_<c> | +An Integral Constant x such that x::value == c +and x::value_type is identical to char. | +
+typedef char_<'c'> c; + +BOOST_MPL_ASSERT(( is_same< c::value_type, char > )); +BOOST_MPL_ASSERT(( is_same< c::type, c > )); +BOOST_MPL_ASSERT(( is_same< next< c >::type, char_<'d'> > )); +BOOST_MPL_ASSERT(( is_same< prior< c >::type, char_<'b'> > )); +BOOST_MPL_ASSERT_RELATION( (c::value), ==, 'c' ); +assert( c() == 'c' ); ++
+ |
+ | Front Page / Macros / Configuration / BOOST_MPL_LIMIT_STRING_SIZE | +
+#if !defined(BOOST_MPL_LIMIT_STRING_SIZE) +# define BOOST_MPL_LIMIT_STRING_SIZE \ + implementation-defined integral constant \ +/**/ +#endif ++
BOOST_MPL_LIMIT_STRING_SIZE is an overridable configuration macro regulating +the maximum arity of the string's variadic forms. In this +implementation of the library, BOOST_MPL_LIMIT_STRING_SIZE has a default value +of 32. To override the default limit, define BOOST_MPL_LIMIT_STRING_SIZE to +the desired maximum arity before including any library header.
++ |
+ | Front Page / Metafunctions / String Operations | +
+ |
+ | Front Page / Sequences / Classes / string | +
string is a variadic, bidirectional, extensible Integral Sequence Wrapper of +characters that supports amortized constant-time insertion and removal of elements at both ends, +and linear-time insertion and removal of elements in the middle. The parameters to string +are multi-character literals, giving a somewhat readable syntax for compile-time strings. +string can also be an argument to the c_str metafunction, which generates a +null-terminated character array that facilitates interoperability with runtime string +processing routines.
+Sequence form | +Header | +
---|---|
Variadic | +#include <boost/mpl/string.hpp> | +
In the following table, s is an instance of string, pos and last are iterators +into s, r is a Forward Sequence of characters, n and x are Integral Constants, +and c1,c2,... cn are arbitrary (multi-)characters.
+Expression | +Semantics | +
---|---|
+string<c1,c2,... cn> ++ |
+string of characters c1,c2,... cn; see +Variadic Sequence. | +
+string<c1,c2,... cn>::type ++ |
+Identical to string<c1,c2,... cn>; +see Variadic Sequence. | +
begin<s>::type | +An iterator pointing to the beginning of s; +see Bidirectional Sequence. | +
end<s>::type | +An iterator pointing to the end of s; +see Bidirectional Sequence. | +
size<s>::type | +The size of s; see Bidirectional Sequence. | +
empty<s>::type | +A boolean Integral Constant c such that +c::value == true if and only if the sequence is empty; +see Bidirectional Sequence. | +
front<s>::type | +The first element in s; see +Bidirectional Sequence. | +
back<s>::type | +The last element in s; see +Bidirectional Sequence. | +
insert<s,pos,x>::type | +A new string of following elements: +[begin<s>::type, pos), x, +[pos, end<s>::type); see Extensible Sequence. | +
insert_range<s,pos,r>::type | +A new string of following elements: +[begin<s>::type, pos), +[begin<r>::type, end<r>::type) +[pos, end<s>::type); see Extensible Sequence. | +
erase<s,pos>::type | +A new string of following elements: +[begin<s>::type, pos), +[next<pos>::type, end<s>::type); see +Extensible Sequence. | +
erase<s,pos,last>::type | +A new string of following elements: +[begin<s>::type, pos), +[last, end<s>::type); see Extensible Sequence. | +
clear<s>::type | +An empty string; see Extensible Sequence. | +
push_back<s,x>::type | +A new string of following elements: +[begin<s>::type, end<s>::type), x; +see Back Extensible Sequence. | +
pop_back<s>::type | +A new string of following elements: +[begin<s>::type, prior< end<s>::type >::type); +see Back Extensible Sequence. | +
push_front<s,x>::type | +A new string of following elements: +[begin<s>::type, end<s>::type), x; see Front Extensible Sequence. | +
pop_front<s>::type | +A new string of following elements: +[next< begin<s>::type >::type, end<s>::type); +see Front Extensible Sequence. | +
c_str<s>::value | +A null-terminated byte string such that +c_str<s>::value[n] is equal to the n-th +character in s, and +c_str<s>::value[size<s>::type::value] is '\0'. | +
+ |