[#boost-urls-query_rule] = xref:boost/urls/query_rule.adoc[boost::urls::query_rule] :relfileprefix: ../../ :mrdocs: Rule for a query string == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/rfc/query_rule.hpp#L70[boost/url/rfc/query_rule.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- constexpr /* implementation-defined */ query_rule = {}; ---- == Description == Value Type [,cpp] ---- using value_type = params_encoded_view; ---- == Example Rules are used with the function xref:boost/urls/grammar/parse-09.adoc[`grammar::parse`]. [,cpp] ---- system::result< params_encoded_view > rv = grammar::parse( "format=web&id=42&compact", query_rule ); ---- == BNF [,cpp] ---- query = *( pchar / "/" / "?" ) query-params = [ query-param ] *( "&" query-param ) query-param = key [ "=" value ] key = *qpchar value = *( qpchar / "=" ) qpchar = unreserved / pct-encoded / "!" / "$" / "'" / "(" / ")" / "*" / "+" / "," / ";" / ":" / "@" / "/" / "?" ---- == Specification * https://datatracker.ietf.org/doc/html/rfc3986#section-3.4[] == See Also xref:boost/urls/grammar/parse-09.adoc[`grammar::parse`], xref:boost/urls/params_encoded_view.adoc[`params_encoded_view`]. [.small]#Created with https://www.mrdocs.com[MrDocs]#