...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This customization point is an MPL metafunction which returns the character
type of a given string type. char_type_of
handles user-defined types such as std::string, as well as C-style strings.
#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 char_type_of { typedef <unspecified> type; };
Parameter |
Description |
Default |
---|---|---|
|
A string 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 |
---|---|
|
The character type of the string type |
Type |
Semantics |
---|---|
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
This customization point needs to be implemented whenever traits::is_string
is implemented.
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 |