...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The is_string
customization
point is a template meta-function. It is used by Qi
String Literals
(lit(str)
),
Qi Character
Literals (lit(c)
),
Karma String
Literals (lit(str)
),
Karma Character
Literals (lit(c)
) and
other Spirit components. It determines whether a supplied type can be treated
as a string.
#include <boost/spirit/home/support/string_traits.hpp>
Also, see Include Structure.
Note | |
---|---|
This header file does not need to be included directly by any user program as it is normally included by other Spirit header files relying on its content. |
Name |
---|
|
template <typename T> struct is_string { <unspecified>; };
Parameter |
Description |
Default |
---|---|---|
|
The type, |
none |
Notation
T
An arbitrary type.
N
An arbitrary integral constant.
Char
A character type.
Traits
A character traits type.
Allocator
A standard allocator type.
Expression |
Semantics |
---|---|
|
Result of the metafunction that evalutes to mpl::true_ if a given
type, |
Type |
Semantics |
---|---|
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
This customization point needs to be implemented to use user-defined string classes that do not correspond to std::string syntax and semantics.
If this customization point is implemented, the following other customization points need to be implemented as well.
Name |
When to implement |
---|---|
For string types whose underlying character type is not |
|
Whenever |
|
Whenever |