boost::urls::grammar::CharSet

Concept for a CharSet

Synopsis

Declared in <boost/url/grammar/charset.hpp>
template<class T>
concept CharSet = requires (T const t, char c)
{
    { t(c) } -> std::convertible_to<bool>;
};


Description

A CharSet is a unary predicate which is invocable with this equivalent signature:

bool( char ch ) const noexcept;

The predicate returns true if ch is a member of the set, or false otherwise.

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; };

Models

See Also

is_charset, find_if, find_if_not.

Created with MrDocs