CharSet
Requirements
In this table:
-
Tis a type meeting the requirements of CharSet -
tis aconstvalue of typeT -
cis a value of typechar -
first,lastare values of type cpp:char const*[]
| Expression | Type | Semantics, Pre/Post-conditions |
|---|---|---|
|
This function returns |
|
|
cpp:char const*[] |
This optional member function examines the valid range of characters in cpp:// [first, last)[] and returns
a pointer to the first occurrence of a character
which is in the set, or returns The implementation of |
|
cpp:char const*[] |
This optional member function examines the valid
range of characters in cpp:[first, last)[] and returns
a pointer to the first occurrence of a character
which is not in the set, or returns The implementation of |
Exemplar
For best results, it is suggested that all constructors and member functions for character sets be marked constexpr.
struct CharSet
{
bool operator()( char c ) const noexcept;
// These are both optional. If either or both are left
// unspecified, a default implementation will be used.
//
char const* find_if( char const* first, char const* last ) const noexcept;
char const* find_if_not( char const* first, char const* last ) const noexcept;
};