| 1 |
|
|
1 |
|
|
| 2 |
|
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
2 |
|
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
|
| 3 |
|
// Copyright (c) 2023 Alan de Freitas (alandefreitas@gmail.com)
|
3 |
|
// Copyright (c) 2023 Alan de Freitas (alandefreitas@gmail.com)
|
| 4 |
|
|
4 |
|
|
| 5 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
5 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
| 6 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
6 |
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
| 7 |
|
|
7 |
|
|
| 8 |
|
// Official repository: https://github.com/boostorg/url
|
8 |
|
// Official repository: https://github.com/boostorg/url
|
| 9 |
|
|
9 |
|
|
| 10 |
|
|
10 |
|
|
| 11 |
|
#ifndef BOOST_URL_RFC_DETAIL_IMPL_IPVFUTURE_RULE_HPP
|
11 |
|
#ifndef BOOST_URL_RFC_DETAIL_IMPL_IPVFUTURE_RULE_HPP
|
| 12 |
|
#define BOOST_URL_RFC_DETAIL_IMPL_IPVFUTURE_RULE_HPP
|
12 |
|
#define BOOST_URL_RFC_DETAIL_IMPL_IPVFUTURE_RULE_HPP
|
| 13 |
|
|
13 |
|
|
| 14 |
|
#include <boost/url/detail/config.hpp>
|
14 |
|
#include <boost/url/detail/config.hpp>
|
| 15 |
|
#include <boost/url/rfc/detail/charsets.hpp>
|
15 |
|
#include <boost/url/rfc/detail/charsets.hpp>
|
| 16 |
|
#include <boost/url/grammar/charset.hpp>
|
16 |
|
#include <boost/url/grammar/charset.hpp>
|
| 17 |
|
#include <boost/url/grammar/delim_rule.hpp>
|
17 |
|
#include <boost/url/grammar/delim_rule.hpp>
|
| 18 |
|
#include <boost/url/grammar/error.hpp>
|
18 |
|
#include <boost/url/grammar/error.hpp>
|
| 19 |
|
#include <boost/url/grammar/hexdig_chars.hpp>
|
19 |
|
#include <boost/url/grammar/hexdig_chars.hpp>
|
| 20 |
|
#include <boost/url/grammar/parse.hpp>
|
20 |
|
#include <boost/url/grammar/parse.hpp>
|
| 21 |
|
#include <boost/url/grammar/token_rule.hpp>
|
21 |
|
#include <boost/url/grammar/token_rule.hpp>
|
| 22 |
|
#include <boost/url/grammar/tuple_rule.hpp>
|
22 |
|
#include <boost/url/grammar/tuple_rule.hpp>
|
| 23 |
|
|
23 |
|
|
| 24 |
|
|
24 |
|
|
| 25 |
|
|
25 |
|
|
| 26 |
|
|
26 |
|
|
| 27 |
|
|
27 |
|
|
| 28 |
|
BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
|
28 |
|
BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
|
| 29 |
|
|
29 |
|
|
| 30 |
|
|
30 |
|
|
| 31 |
|
|
31 |
|
|
| 32 |
|
|
32 |
|
|
| 33 |
|
|
33 |
|
|
| 34 |
|
|
34 |
|
|
| 35 |
|
system::result<value_type>
|
35 |
|
system::result<value_type>
|
| 36 |
|
|
36 |
|
|
| 37 |
|
|
37 |
|
|
| 38 |
|
|
38 |
|
|
| 39 |
|
|
39 |
|
|
| 40 |
|
|
40 |
|
|
| 41 |
|
|
41 |
|
|
| 42 |
|
auto rv = grammar::parse(
|
42 |
|
auto rv = grammar::parse(
|
| 43 |
|
|
43 |
|
|
| 44 |
|
|
44 |
|
|
| 45 |
|
grammar::delim_rule('v'),
|
45 |
|
grammar::delim_rule('v'),
|
| 46 |
|
|
46 |
|
|
| 47 |
|
|
47 |
|
|
| 48 |
|
grammar::delim_rule('.'),
|
48 |
|
grammar::delim_rule('.'),
|
| 49 |
|
grammar::token_rule(minor_chars)));
|
49 |
|
grammar::token_rule(minor_chars)));
|
| 50 |
|
|
50 |
|
|
| 51 |
|
|
51 |
|
|
| 52 |
|
|
52 |
|
|
| 53 |
|
t.major = std::get<0>(*rv);
|
53 |
|
t.major = std::get<0>(*rv);
|
| 54 |
|
t.minor = std::get<1>(*rv);
|
54 |
|
t.minor = std::get<1>(*rv);
|
| 55 |
|
// token_rule guarantees non-empty tokens,
|
55 |
|
// token_rule guarantees non-empty tokens,
|
| 56 |
|
// so major/minor are always non-empty here.
|
56 |
|
// so major/minor are always non-empty here.
|
| 57 |
|
BOOST_ASSERT(!t.major.empty());
|
57 |
|
BOOST_ASSERT(!t.major.empty());
|
| 58 |
|
BOOST_ASSERT(!t.minor.empty());
|
58 |
|
BOOST_ASSERT(!t.minor.empty());
|
| 59 |
|
t.str = core::string_view(
|
59 |
|
t.str = core::string_view(
|
| 60 |
|
|
60 |
|
|
| 61 |
|
|
61 |
|
|
| 62 |
|
|
62 |
|
|
| 63 |
|
|
63 |
|
|
| 64 |
|
|
64 |
|
|
| 65 |
|
|
65 |
|
|
| 66 |
|
|
66 |
|
|
| 67 |
|
|
67 |
|
|
| 68 |
|
|
68 |
|
|
| 69 |
|
|
69 |
|
|