// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official repository: https://github.com/boostorg/url // #ifndef BOOST_URL_RFC_DETAIL_RELATIVE_PART_RULE_HPP #define BOOST_URL_RFC_DETAIL_RELATIVE_PART_RULE_HPP #include #include #include #include #include namespace boost { namespace urls { namespace detail { /** Rule for relative-part @par BNF @code relative-part = "//" authority path-abempty / path-absolute / path-noscheme / path-abempty / path-empty @endcode @par Specification @li 4.2. Relative Reference (rfc3986) @li Errata ID: 5428 (rfc3986) @see @ref authority_rule. */ struct relative_part_rule_t { struct value_type { authority_view authority; pct_string_view path; std::size_t segment_count = 0; bool has_authority = false; }; auto parse( char const*& it, char const* end ) const noexcept -> system::result; }; constexpr relative_part_rule_t relative_part_rule{}; } // detail } // urls } // boost #endif