:relfileprefix: ../../../
[#boost-urls-grammar-squelch]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/grammar.adoc[pass:[grammar]]::squelch


Squelch the value of a rule


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/tuple_rule.hpp#L277[boost/url/grammar/tuple_rule.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
template<class Rule>
constexpr
pass:q[_implementation-defined_]
squelch(Rule const& r) noexcept;
----

=== Description


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.
[,cpp]
----
using value_type = void;
----

=== With `squelch`:
[,cpp]
----
system::result< std::tuple< decode_view, core::string_view > > rv = parse(
    "www.example.com:443",
    tuple_rule(
        pct_encoded_rule(unreserved_chars + '-' + '.'),
        squelch( delim_rule( ':' ) ),
        token_rule( digit_chars ) ) );
----

=== Without `squelch`:
[,cpp]
----
system::result< std::tuple< decode_view, core::string_view, core::string_view > > rv = parse(
    "www.example.com:443",
    tuple_rule(
        pct_encoded_rule(unreserved_chars + '-' + '.'),
        delim_rule( ':' ),
        token_rule( digit_chars ) ) );
----





=== Parameters

|===
| Name | Description 

| *r*
| 
The rule to squelch

|===




=== See Also


xref:boost/urls/grammar/delim_rule-0a.adoc[delim_rule]
,
xref:boost/urls/grammar/digit_chars.adoc[digit_chars]
,
xref:boost/urls/grammar/parse-02.adoc[parse]
,
xref:boost/urls/grammar/tuple_rule.adoc[tuple_rule]
,
xref:boost/urls/grammar/token_rule.adoc[token_rule]
,
xref:boost/urls/decode_view.adoc[decode_view]
,
xref:boost/urls/pct_encoded_rule.adoc[pct_encoded_rule]
,
xref:boost/urls/unreserved_chars.adoc[unreserved_chars]
.



