[#boost-urls-grammar-tuple_rule]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::tuple&lowbar;rule
:relfileprefix: ../../../
:mrdocs:


Match a series of rules in order

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/tuple_rule.hpp#L122[boost&sol;url&sol;grammar&sol;tuple&lowbar;rule&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:boost/urls/grammar/Rule.adoc[Rule] R0,
    xref:boost/urls/grammar/Rule.adoc[Rule]... Rn&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;::xref:boost/urls/grammar/implementation_defined/tuple_rule_t.adoc[tuple&lowbar;rule&lowbar;t]&lt;R0, Rn...&gt;
tuple&lowbar;rule(
    R0 const& r0,
    Rn const&... rn) noexcept;
----

== Description


This matches a series of rules in the    order specified&period; Upon success the input    is adjusted to point to the first    unconsumed character&period; There is no    implicit specification of linear white    space between each rule&period;


=== Value Type

[,cpp]
----
using value_type = __see_below__;
----
The sequence rule usually returns a    `std&colon;&colon;tuple` containing the the `value&lowbar;type`    of each corresponding rule in the sequence,    except that `void` values are removed&period;    However, if there is exactly one non&hyphen;void    value type `T`, then the sequence rule    returns `system&colon;&colon;result&lt;T&gt;` instead of    `system&colon;&colon;result&lt;tuple&lt;&period;&period;&period;&gt;&gt;`&period;


=== Example

Rules are used with the function xref:boost/urls/grammar/parse-02.adoc[parse]&period;

[,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&period;1&period;  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&lowbar;octet&lowbar;rule],        xref:boost/urls/grammar/delim_rule-01.adoc[delim&lowbar;rule],        xref:boost/urls/grammar/parse-02.adoc[parse],        xref:boost/urls/grammar/squelch.adoc[squelch]&period;






[.small]#Created with https://www.mrdocs.com[MrDocs]#
