|
||||
File indexing completed on 2025-01-18 09:53:29
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 0020 /** Rule for URI-reference 0021 0022 @par Value Type 0023 @code 0024 using value_type = url_view; 0025 @endcode; 0026 0027 @par Example 0028 Rules are used with the function @ref grammar::parse. 0029 @code 0030 system::result< url_view > rv = grammar::parse( "ws://echo.example.com/?name=boost#demo", uri_reference_rule ); 0031 @endcode 0032 0033 @par BNF 0034 @code 0035 URI-reference = URI / relative-ref 0036 0037 URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] 0038 relative-ref = relative-part [ "?" query ] [ "#" fragment ] 0039 @endcode 0040 0041 @par Specification 0042 @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3" 0043 >3. Syntax Components (rfc3986)</a> 0044 0045 @see 0046 @ref grammar::parse, 0047 @ref parse_uri_reference, 0048 @ref url_view. 0049 */ 0050 #ifdef BOOST_URL_DOCS 0051 constexpr __implementation_defined__ uri_reference_rule{}; 0052 #else 0053 struct uri_reference_rule_t 0054 { 0055 using value_type = url_view; 0056 0057 BOOST_URL_DECL 0058 auto 0059 parse( 0060 char const*& it, 0061 char const* end 0062 ) const noexcept -> 0063 system::result<value_type>; 0064 }; 0065 0066 constexpr uri_reference_rule_t uri_reference_rule{}; 0067 #endif 0068 0069 } // urls 0070 } // boost 0071 0072 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |