[#boost-urls-grammar-tuple_rule] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::tuple_rule :relfileprefix: ../../../ :mrdocs: Match a series of rules in order == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/tuple_rule.hpp#L122[boost/url/grammar/tuple_rule.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< xref:boost/urls/grammar/Rule.adoc[Rule] R0, xref:boost/urls/grammar/Rule.adoc[Rule]... Rn> constexpr /* implementation-defined */::xref:boost/urls/grammar/implementation_defined/tuple_rule_t.adoc[tuple_rule_t]<R0, Rn...> tuple_rule( R0 const& r0, Rn const&... rn) noexcept; ---- == Description This matches a series of rules in the order specified. Upon success the input is adjusted to point to the first unconsumed character. There is no implicit specification of linear white space between each rule. === Value Type [,cpp] ---- using value_type = __see_below__; ---- The sequence rule usually returns a `std::tuple` containing the the `value_type` of each corresponding rule in the sequence, except that `void` values are removed. However, if there is exactly one non‐void value type `T`, then the sequence rule returns `system::result<T>` instead of `system::result<tuple<...>>`. === Example Rules are used with the function xref:boost/urls/grammar/parse-02.adoc[parse]. [,cpp] ---- system::result< std::tuple< unsigned char, unsigned char, unsigned char, unsigned char > > rv = parse( "192.168.0.1", tuple_rule( dec_octet_rule, squelch( delim_rule('.') ), dec_octet_rule, squelch( delim_rule('.') ), dec_octet_rule, squelch( delim_rule('.') ), dec_octet_rule ) ); ---- === BNF [,cpp] ---- sequence = rule1 rule2 rule3... ---- === Specification * link:https://datatracker.ietf.org/doc/html/rfc5234#section-3.1[3.1. Concatenation (rfc5234)] == Parameters |=== | Name | Description | *rn* | A list of one or more rules to match |=== == See Also xref:boost/urls/grammar/dec_octet_rule.adoc[dec_octet_rule], xref:boost/urls/grammar/delim_rule-01.adoc[delim_rule], xref:boost/urls/grammar/parse-02.adoc[parse], xref:boost/urls/grammar/squelch.adoc[squelch]. [.small]#Created with https://www.mrdocs.com[MrDocs]#