![]() |
Home | Libraries | People | FAQ | More |
Squelch the value of a rule.
Defined in header <boost/url/grammar/tuple_rule.hpp>
template< class Rule> constexpr implementation-defined squelch( Rule const& r);
This function returns a new rule which matches the specified rule, and converts
its value type to void
. This
is useful for matching delimiters in a grammar, where the value for the delimiter
is not needed.
using value_type = void;
With squelch
:
system::result< std::tuple< decode_view, core::string_view > > rv = [link url.ref.boost__urls__grammar__parse `parse`]( "www.example.com:443" , [link url.ref.boost__urls__grammar__tuple_rule `tuple_rule`]( [link url.ref.boost__urls__pct_encoded_rule `pct_encoded_rule`]([link url.ref.boost__urls__unreserved_chars `unreserved_chars`] + '-' + '.' ), [link url.ref.boost__urls__grammar__squelch `squelch`]( [link url.ref.boost__urls__grammar__delim_rule `delim_rule`]( ':' ) ), [link url.ref.boost__urls__grammar__token_rule `token_rule`]( [link url.ref.boost__urls__grammar__digit_chars `digit_chars`] ) ) );
Without squelch
:
system::result< std::tuple< decode_view, core::string_view, core::string_view > > rv = [link url.ref.boost__urls__grammar__parse `parse`]( "www.example.com:443" , [link url.ref.boost__urls__grammar__tuple_rule `tuple_rule`]( [link url.ref.boost__urls__pct_encoded_rule `pct_encoded_rule`]([link url.ref.boost__urls__unreserved_chars `unreserved_chars`] + '-' + '.' ), [link url.ref.boost__urls__grammar__delim_rule `delim_rule`]( ':' ), [link url.ref.boost__urls__grammar__token_rule `token_rule`]( [link url.ref.boost__urls__grammar__digit_chars `digit_chars`] ) ) );
Name |
Description |
---|---|
|
The rule to squelch |
delim_rule
,
digit_chars
,
parse
,
tuple_rule
,
token_rule
,
decode_view
,
pct_encoded_rule
,
unreserved_chars
.
Convenience header <boost/url/grammar.hpp>