[#boost-urls-relative_ref_rule]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::relative&lowbar;ref&lowbar;rule
:relfileprefix: ../../
:mrdocs:

Rule for relative&hyphen;ref

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/rfc/relative_ref_rule.hpp#L61[boost&sol;url&sol;rfc&sol;relative&lowbar;ref&lowbar;rule&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr &sol;&ast; implementation-defined &ast;&sol; relative&lowbar;ref&lowbar;rule = &lcub;&rcub;;
----

== Value Type

[,cpp]
----
using value_type = url_view;
----
== Example

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

[,cpp]
----
system::result< url_view > rv = grammar::parse( "images/dot.gif?v=hide#a", relative_ref_rule );
----
== BNF

[,cpp]
----
relative-ref  = relative-part [ "?" query ] [ "#" fragment ]
----
== Specification

* https://datatracker.ietf.org/doc/html/rfc3986#section-4.2[4&period;2&period; Relative Reference (rfc3986)]

== See Also

xref:boost/urls/grammar/parse-09.adoc[`grammar&colon;&colon;parse`], xref:boost/urls/parse_relative_ref.adoc[`parse&lowbar;relative&lowbar;ref`], xref:boost/urls/url_view.adoc[`url&lowbar;view`]&period;


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