100.00% Lines (2/2) 100.00% Functions (1/1)
TLA Baseline Branch
Line Hits Code Line Hits Code
1   // 1   //
2   // Copyright (c) 2022 alandefreitas (alandefreitas@gmail.com) 2   // Copyright (c) 2022 alandefreitas (alandefreitas@gmail.com)
3   // 3   //
4   // Distributed under the Boost Software License, Version 1.0. (See accompanying 4   // 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) 5   // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6   // 6   //
7   // Official repository: https://github.com/boostorg/url 7   // Official repository: https://github.com/boostorg/url
8   // 8   //
9   9  
10   #ifndef BOOST_URL_RFC_DETAIL_CHARSETS_HPP 10   #ifndef BOOST_URL_RFC_DETAIL_CHARSETS_HPP
11   #define BOOST_URL_RFC_DETAIL_CHARSETS_HPP 11   #define BOOST_URL_RFC_DETAIL_CHARSETS_HPP
12   12  
13   #include <boost/url/rfc/pchars.hpp> 13   #include <boost/url/rfc/pchars.hpp>
14   #include <boost/url/rfc/sub_delim_chars.hpp> 14   #include <boost/url/rfc/sub_delim_chars.hpp>
15   #include <boost/url/rfc/unreserved_chars.hpp> 15   #include <boost/url/rfc/unreserved_chars.hpp>
16   16  
17   namespace boost { 17   namespace boost {
18   namespace urls { 18   namespace urls {
19   namespace detail { 19   namespace detail {
20   20  
21   struct empty_chars_t 21   struct empty_chars_t
22   { 22   {
23   constexpr 23   constexpr
24   bool 24   bool
HITCBC 25   83 operator()(char) const noexcept 25   83 operator()(char) const noexcept
26   { 26   {
HITCBC 27   83 return false; 27   83 return false;
28   } 28   }
29   }; 29   };
30   30  
31   constexpr 31   constexpr
32   empty_chars_t 32   empty_chars_t
33   empty_chars{}; 33   empty_chars{};
34   34  
35   constexpr 35   constexpr
36   auto 36   auto
37   user_chars = 37   user_chars =
38   unreserved_chars + sub_delim_chars; 38   unreserved_chars + sub_delim_chars;
39   39  
40   constexpr 40   constexpr
41   auto 41   auto
42   password_chars = 42   password_chars =
43   unreserved_chars + sub_delim_chars + ':'; 43   unreserved_chars + sub_delim_chars + ':';
44   44  
45   constexpr 45   constexpr
46   auto 46   auto
47   userinfo_chars = 47   userinfo_chars =
48   password_chars; 48   password_chars;
49   49  
50   constexpr 50   constexpr
51   auto 51   auto
52   host_chars = 52   host_chars =
53   unreserved_chars + sub_delim_chars; 53   unreserved_chars + sub_delim_chars;
54   54  
55   constexpr 55   constexpr
56   auto 56   auto
57   reg_name_chars = 57   reg_name_chars =
58   unreserved_chars + '-' + '.'; 58   unreserved_chars + '-' + '.';
59   59  
60   constexpr 60   constexpr
61   auto 61   auto
62   segment_chars = 62   segment_chars =
63   pchars; 63   pchars;
64   64  
65   constexpr 65   constexpr
66   auto 66   auto
67   path_chars = 67   path_chars =
68   segment_chars + '/'; 68   segment_chars + '/';
69   69  
70   constexpr 70   constexpr
71   auto 71   auto
72   query_chars = 72   query_chars =
73   pchars + '/' + '?' + '[' + ']'; 73   pchars + '/' + '?' + '[' + ']';
74   74  
75   constexpr 75   constexpr
76   grammar::lut_chars 76   grammar::lut_chars
77   query_ignore_chars = 77   query_ignore_chars =
78   "&=+"; 78   "&=+";
79   79  
80   constexpr 80   constexpr
81   auto 81   auto
82   param_key_chars = pchars 82   param_key_chars = pchars
83   + '/' + '?' + '[' + ']' 83   + '/' + '?' + '[' + ']'
84   - '&' - '='; 84   - '&' - '=';
85   85  
86   constexpr 86   constexpr
87   auto 87   auto
88   param_value_chars = pchars 88   param_value_chars = pchars
89   + '/' + '?' 89   + '/' + '?'
90   - '&'; 90   - '&';
91   91  
92   constexpr 92   constexpr
93   auto 93   auto
94   fragment_chars = 94   fragment_chars =
95   pchars + '/' + '?' + '#'; 95   pchars + '/' + '?' + '#';
96   96  
97   constexpr 97   constexpr
98   auto 98   auto
99   nocolon_pchars = 99   nocolon_pchars =
100   pchars - ':'; 100   pchars - ':';
101   101  
102   } // detail 102   } // detail
103   } // urls 103   } // urls
104   } // boost 104   } // boost
105   105  
106   #endif 106   #endif