| 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) 2022 Alan de Freitas (alandefreitas@gmail.com)
|
| 3 |
|
|
4 |
|
|
| 4 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
5 |
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
| 5 |
|
// 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)
|
| 6 |
|
|
7 |
|
|
| 7 |
|
// Official repository: https://github.com/boostorg/url
|
8 |
|
// Official repository: https://github.com/boostorg/url
|
| 8 |
|
|
9 |
|
|
| 9 |
|
|
10 |
|
|
| 10 |
|
#ifndef BOOST_URL_GRAMMAR_IMPL_PARSE_HPP
|
11 |
|
#ifndef BOOST_URL_GRAMMAR_IMPL_PARSE_HPP
|
| 11 |
|
#define BOOST_URL_GRAMMAR_IMPL_PARSE_HPP
|
12 |
|
#define BOOST_URL_GRAMMAR_IMPL_PARSE_HPP
|
| 12 |
|
|
13 |
|
|
| 13 |
|
#include <boost/url/grammar/error.hpp>
|
14 |
|
#include <boost/url/grammar/error.hpp>
|
| 14 |
|
#include <boost/url/grammar/type_traits.hpp>
|
15 |
|
#include <boost/url/grammar/type_traits.hpp>
|
| 15 |
|
|
16 |
|
|
| 16 |
|
|
17 |
|
|
| 17 |
|
|
18 |
|
|
| 18 |
|
|
19 |
|
|
| 19 |
|
|
20 |
|
|
| 20 |
|
template<BOOST_URL_CONSTRAINT(Rule) R>
|
21 |
|
template<BOOST_URL_CONSTRAINT(Rule) R>
|
| 21 |
- |
|
22 |
+ |
BOOST_URL_CXX14_CONSTEXPR
|
| 22 |
|
|
23 |
|
|
| 23 |
|
|
24 |
|
|
| 24 |
|
|
25 |
|
|
| 25 |
|
|
26 |
|
|
| 26 |
|
|
27 |
|
|
| 27 |
|
system::result<typename R::value_type>
|
28 |
|
system::result<typename R::value_type>
|
| 28 |
|
|
29 |
|
|
| 29 |
|
// If this goes off, it means the rule
|
30 |
|
// If this goes off, it means the rule
|
| 30 |
|
// passed in did not meet the requirements.
|
31 |
|
// passed in did not meet the requirements.
|
| 31 |
|
// Please check the documentation.
|
32 |
|
// Please check the documentation.
|
| 32 |
|
|
33 |
|
|
| 33 |
|
|
34 |
|
|
| 34 |
|
"Rule requirements not met");
|
35 |
|
"Rule requirements not met");
|
| 35 |
|
|
36 |
|
|
| 36 |
|
|
37 |
|
|
| 37 |
|
|
38 |
|
|
| 38 |
|
|
39 |
|
|
| 39 |
|
template<BOOST_URL_CONSTRAINT(Rule) R>
|
40 |
|
template<BOOST_URL_CONSTRAINT(Rule) R>
|
| 40 |
- |
|
41 |
+ |
BOOST_URL_CXX14_CONSTEXPR
|
| 41 |
|
|
42 |
|
|
| 42 |
|
|
43 |
|
|
| 43 |
|
|
44 |
|
|
| 44 |
|
|
45 |
|
|
| 45 |
|
system::result<typename R::value_type>
|
46 |
|
system::result<typename R::value_type>
|
| 46 |
|
|
47 |
|
|
| 47 |
|
// If this goes off, it means the rule
|
48 |
|
// If this goes off, it means the rule
|
| 48 |
|
// passed in did not meet the requirements.
|
49 |
|
// passed in did not meet the requirements.
|
| 49 |
|
// Please check the documentation.
|
50 |
|
// Please check the documentation.
|
| 50 |
|
|
51 |
|
|
| 51 |
|
|
52 |
|
|
| 52 |
|
"Rule requirements not met");
|
53 |
|
"Rule requirements not met");
|
| 53 |
|
|
54 |
|
|
| 54 |
|
|
55 |
|
|
| 55 |
|
auto const end = it + s.size();
|
56 |
|
auto const end = it + s.size();
|
| 56 |
|
auto rv = r.parse(it, end);
|
57 |
|
auto rv = r.parse(it, end);
|
| 57 |
|
|
58 |
|
|
| 58 |
|
|
59 |
|
|
| 59 |
|
|
60 |
|
|
| 60 |
|
|
61 |
|
|
| 61 |
|
|
62 |
|
|
| 62 |
|
|
63 |
|
|
| 63 |
|
|
64 |
|
|
| 64 |
|
|
65 |
|
|
| 65 |
|
|
66 |
|
|
| 66 |
|
|
67 |
|
|
| 67 |
|
|
68 |
|
|