Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-19 09:04:15

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/url
0008 //
0009 
0010 #ifndef BOOST_URL_RFC_URI_REFERENCE_RULE_HPP
0011 #define BOOST_URL_RFC_URI_REFERENCE_RULE_HPP
0012 
0013 #include <boost/url/detail/config.hpp>
0014 #include <boost/url/error_types.hpp>
0015 #include <boost/url/url_view.hpp>
0016 
0017 namespace boost {
0018 namespace urls {
0019 namespace implementation_defined {
0020 struct uri_reference_rule_t
0021 {
0022     using value_type = url_view;
0023 
0024     BOOST_URL_DECL
0025     auto
0026     parse(
0027         char const*& it,
0028         char const* end
0029             ) const noexcept ->
0030     system::result<value_type>;
0031 };
0032 } // implementation_defined
0033 
0034 /** Rule for URI-reference
0035 
0036     @par Value Type
0037     @code
0038     using value_type = url_view;
0039     @endcode
0040 
0041     @par Example
0042     Rules are used with the function @ref grammar::parse.
0043     @code
0044     system::result< url_view > rv = grammar::parse( "ws://echo.example.com/?name=boost#demo", uri_reference_rule );
0045     @endcode
0046 
0047     @par BNF
0048     @code
0049     URI-reference = URI / relative-ref
0050 
0051     URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
0052     relative-ref  = relative-part [ "?" query ] [ "#" fragment ]
0053     @endcode
0054 
0055     @par Specification
0056     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3"
0057         >3. Syntax Components (rfc3986)</a>
0058 
0059     @see
0060         @ref grammar::parse,
0061         @ref parse_uri_reference,
0062         @ref url_view.
0063 */
0064 constexpr implementation_defined::uri_reference_rule_t uri_reference_rule{};
0065 
0066 } // urls
0067 } // boost
0068 
0069 #endif