| 1 |
|
|
1 |
|
|
| 2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
|
2 |
|
// Copyright (c) 2019 Vinnie Falco (vinnie.falco@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_STATIC_URL_HPP
|
10 |
|
#ifndef BOOST_URL_STATIC_URL_HPP
|
| 11 |
|
#define BOOST_URL_STATIC_URL_HPP
|
11 |
|
#define BOOST_URL_STATIC_URL_HPP
|
| 12 |
|
|
12 |
|
|
| 13 |
|
#include <boost/url/detail/config.hpp>
|
13 |
|
#include <boost/url/detail/config.hpp>
|
| 14 |
|
#include <boost/url/url_base.hpp>
|
14 |
|
#include <boost/url/url_base.hpp>
|
| 15 |
|
#include <boost/align/align_up.hpp>
|
15 |
|
#include <boost/align/align_up.hpp>
|
| 16 |
|
#include <boost/core/detail/static_assert.hpp>
|
16 |
|
#include <boost/core/detail/static_assert.hpp>
|
| 17 |
|
|
17 |
|
|
| 18 |
|
|
18 |
|
|
| 19 |
|
|
19 |
|
|
| 20 |
|
|
20 |
|
|
| 21 |
|
|
21 |
|
|
| 22 |
|
|
22 |
|
|
| 23 |
|
template<std::size_t Capacity>
|
23 |
|
template<std::size_t Capacity>
|
| 24 |
|
|
24 |
|
|
| 25 |
|
|
25 |
|
|
| 26 |
|
|
26 |
|
|
| 27 |
|
// VFALCO This class is for reducing
|
27 |
|
// VFALCO This class is for reducing
|
| 28 |
|
// the number of template instantiations,
|
28 |
|
// the number of template instantiations,
|
| 29 |
|
// and keep definitions in the library
|
29 |
|
// and keep definitions in the library
|
| 30 |
|
|
30 |
|
|
| 31 |
|
/** Common implementation for all static URLs
|
31 |
|
/** Common implementation for all static URLs
|
| 32 |
|
|
32 |
|
|
| 33 |
|
This base class is used by the library
|
33 |
|
This base class is used by the library
|
| 34 |
|
to provide common functionality for
|
34 |
|
to provide common functionality for
|
| 35 |
|
static URLs. Users should not use this
|
35 |
|
static URLs. Users should not use this
|
| 36 |
|
class directly. Instead, construct an
|
36 |
|
class directly. Instead, construct an
|
| 37 |
|
instance of one of the containers
|
37 |
|
instance of one of the containers
|
| 38 |
|
or call a parsing function.
|
38 |
|
or call a parsing function.
|
| 39 |
|
|
39 |
|
|
| 40 |
|
|
40 |
|
|
| 41 |
|
|
41 |
|
|
| 42 |
|
|
42 |
|
|
| 43 |
|
|
43 |
|
|
| 44 |
|
|
44 |
|
|
| 45 |
|
|
45 |
|
|
| 46 |
|
@li @ref parse_absolute_uri
|
46 |
|
@li @ref parse_absolute_uri
|
| 47 |
|
@li @ref parse_origin_form
|
47 |
|
@li @ref parse_origin_form
|
| 48 |
|
@li @ref parse_relative_ref
|
48 |
|
@li @ref parse_relative_ref
|
| 49 |
|
|
49 |
|
|
| 50 |
|
@li @ref parse_uri_reference
|
50 |
|
@li @ref parse_uri_reference
|
| 51 |
|
|
51 |
|
|
| 52 |
|
|
52 |
|
|
| 53 |
|
|
53 |
|
|
| 54 |
|
|
54 |
|
|
| 55 |
|
|
55 |
|
|
| 56 |
|
|
56 |
|
|
| 57 |
|
|
57 |
|
|
| 58 |
|
|
58 |
|
|
| 59 |
|
~static_url_base() = default;
|
59 |
|
~static_url_base() = default;
|
| 60 |
|
|
60 |
|
|
| 61 |
|
char* buf, std::size_t cap) noexcept;
|
61 |
|
char* buf, std::size_t cap) noexcept;
|
| 62 |
|
|
62 |
|
|
| 63 |
|
char* buf, std::size_t cap, core::string_view s);
|
63 |
|
char* buf, std::size_t cap, core::string_view s);
|
| 64 |
|
void clear_impl() noexcept override;
|
64 |
|
void clear_impl() noexcept override;
|
| 65 |
|
void reserve_impl(std::size_t, op_t&) override;
|
65 |
|
void reserve_impl(std::size_t, op_t&) override;
|
| 66 |
|
void cleanup(op_t&) override;
|
66 |
|
void cleanup(op_t&) override;
|
| 67 |
|
|
67 |
|
|
| 68 |
|
|
68 |
|
|
| 69 |
|
copy(url_view_base const& u)
|
69 |
|
copy(url_view_base const& u)
|
| 70 |
|
|
70 |
|
|
| 71 |
|
|
71 |
|
|
| 72 |
|
|
72 |
|
|
| 73 |
|
|
73 |
|
|
| 74 |
|
|
74 |
|
|
| 75 |
|
|
75 |
|
|
| 76 |
|
//------------------------------------------------
|
76 |
|
//------------------------------------------------
|
| 77 |
|
|
77 |
|
|
| 78 |
|
/** A modifiable container for a URL.
|
78 |
|
/** A modifiable container for a URL.
|
| 79 |
|
|
79 |
|
|
| 80 |
|
This container owns a url, represented
|
80 |
|
This container owns a url, represented
|
| 81 |
|
by an inline, null-terminated character
|
81 |
|
by an inline, null-terminated character
|
| 82 |
|
buffer with fixed capacity.
|
82 |
|
buffer with fixed capacity.
|
| 83 |
|
The contents may be inspected and modified,
|
83 |
|
The contents may be inspected and modified,
|
| 84 |
|
and the implementation maintains a useful
|
84 |
|
and the implementation maintains a useful
|
| 85 |
|
invariant: changes to the url always
|
85 |
|
invariant: changes to the url always
|
| 86 |
|
leave it in a valid state.
|
86 |
|
leave it in a valid state.
|
| 87 |
|
|
87 |
|
|
| 88 |
|
|
88 |
|
|
| 89 |
|
|
89 |
|
|
| 90 |
|
static_url< 1024 > u( "https://www.example.com" );
|
90 |
|
static_url< 1024 > u( "https://www.example.com" );
|
| 91 |
|
|
91 |
|
|
| 92 |
|
|
92 |
|
|
| 93 |
|
|
93 |
|
|
| 94 |
|
|
94 |
|
|
| 95 |
|
this->capacity() == Capacity + 1
|
95 |
|
this->capacity() == Capacity + 1
|
| 96 |
|
|
96 |
|
|
| 97 |
|
|
97 |
|
|
| 98 |
|
@tparam Capacity The maximum capacity
|
98 |
|
@tparam Capacity The maximum capacity
|
| 99 |
|
in characters, not including the
|
99 |
|
in characters, not including the
|
| 100 |
|
|
100 |
|
|
| 101 |
|
|
101 |
|
|
| 102 |
|
|
102 |
|
|
| 103 |
|
|
103 |
|
|
| 104 |
|
|
104 |
|
|
| 105 |
|
|
105 |
|
|
| 106 |
|
template<std::size_t Capacity>
|
106 |
|
template<std::size_t Capacity>
|
| 107 |
|
|
107 |
|
|
| 108 |
|
|
108 |
|
|
| 109 |
|
|
109 |
|
|
| 110 |
|
|
110 |
|
|
| 111 |
|
|
111 |
|
|
| 112 |
|
friend std::hash<static_url>;
|
112 |
|
friend std::hash<static_url>;
|
| 113 |
|
using url_view_base::digest;
|
113 |
|
using url_view_base::digest;
|
| 114 |
|
|
114 |
|
|
| 115 |
|
|
115 |
|
|
| 116 |
|
//--------------------------------------------
|
116 |
|
//--------------------------------------------
|
| 117 |
|
|
117 |
|
|
| 118 |
|
|
118 |
|
|
| 119 |
|
|
119 |
|
|
| 120 |
|
//--------------------------------------------
|
120 |
|
//--------------------------------------------
|
| 121 |
|
|
121 |
|
|
| 122 |
|
|
122 |
|
|
| 123 |
|
|
123 |
|
|
| 124 |
|
Any params, segments, iterators, or
|
124 |
|
Any params, segments, iterators, or
|
| 125 |
|
views which reference this object are
|
125 |
|
views which reference this object are
|
| 126 |
|
invalidated. The underlying character
|
126 |
|
invalidated. The underlying character
|
| 127 |
|
buffer is destroyed, invalidating all
|
127 |
|
buffer is destroyed, invalidating all
|
| 128 |
|
|
128 |
|
|
| 129 |
|
|
129 |
|
|
| 130 |
|
|
130 |
|
|
| 131 |
|
|
131 |
|
|
| 132 |
|
|
132 |
|
|
| 133 |
|
|
133 |
|
|
| 134 |
|
Default constructed urls contain
|
134 |
|
Default constructed urls contain
|
| 135 |
|
a zero-length string. This matches
|
135 |
|
a zero-length string. This matches
|
| 136 |
|
the grammar for a relative-ref with
|
136 |
|
the grammar for a relative-ref with
|
| 137 |
|
an empty path and no query or
|
137 |
|
an empty path and no query or
|
| 138 |
|
|
138 |
|
|
| 139 |
|
|
139 |
|
|
| 140 |
|
|
140 |
|
|
| 141 |
|
|
141 |
|
|
| 142 |
|
|
142 |
|
|
| 143 |
|
|
143 |
|
|
| 144 |
|
|
144 |
|
|
| 145 |
|
|
145 |
|
|
| 146 |
|
|
146 |
|
|
| 147 |
|
|
147 |
|
|
| 148 |
|
|
148 |
|
|
| 149 |
|
|
149 |
|
|
| 150 |
|
|
150 |
|
|
| 151 |
|
|
151 |
|
|
| 152 |
|
|
152 |
|
|
| 153 |
|
|
153 |
|
|
| 154 |
|
|
154 |
|
|
| 155 |
|
|
155 |
|
|
| 156 |
|
|
156 |
|
|
| 157 |
|
|
157 |
|
|
| 158 |
|
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
158 |
|
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
| 159 |
|
|
159 |
|
|
| 160 |
|
|
160 |
|
|
| 161 |
|
|
161 |
|
|
| 162 |
|
<a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2"
|
162 |
|
<a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2"
|
| 163 |
|
>4.2. Relative Reference (rfc3986)</a>
|
163 |
|
>4.2. Relative Reference (rfc3986)</a>
|
| 164 |
|
|
164 |
|
|
| 165 |
|
|
165 |
|
|
| 166 |
|
|
166 |
|
|
| 167 |
|
|
167 |
|
|
| 168 |
|
|
168 |
|
|
| 169 |
|
|
169 |
|
|
| 170 |
|
|
170 |
|
|
| 171 |
|
|
171 |
|
|
| 172 |
|
|
172 |
|
|
| 173 |
|
This function constructs a url from
|
173 |
|
This function constructs a url from
|
| 174 |
|
the string `s`, which must contain a
|
174 |
|
the string `s`, which must contain a
|
| 175 |
|
valid <em>URI</em> or <em>relative-ref</em>
|
175 |
|
valid <em>URI</em> or <em>relative-ref</em>
|
| 176 |
|
or else an exception is thrown.
|
176 |
|
or else an exception is thrown.
|
| 177 |
|
The new url retains ownership by
|
177 |
|
The new url retains ownership by
|
| 178 |
|
making a copy of the passed string.
|
178 |
|
making a copy of the passed string.
|
| 179 |
|
|
179 |
|
|
| 180 |
|
|
180 |
|
|
| 181 |
|
|
181 |
|
|
| 182 |
|
static_url< 1024 > u( "https://www.example.com" );
|
182 |
|
static_url< 1024 > u( "https://www.example.com" );
|
| 183 |
|
|
183 |
|
|
| 184 |
|
|
184 |
|
|
| 185 |
|
|
185 |
|
|
| 186 |
|
|
186 |
|
|
| 187 |
|
return static_url( parse_uri_reference( s ).value() );
|
187 |
|
return static_url( parse_uri_reference( s ).value() );
|
| 188 |
|
|
188 |
|
|
| 189 |
|
|
189 |
|
|
| 190 |
|
|
190 |
|
|
| 191 |
|
|
191 |
|
|
| 192 |
|
this->buffer().data() != s.data()
|
192 |
|
this->buffer().data() != s.data()
|
| 193 |
|
|
193 |
|
|
| 194 |
|
|
194 |
|
|
| 195 |
|
|
195 |
|
|
| 196 |
|
|
196 |
|
|
| 197 |
|
|
197 |
|
|
| 198 |
|
|
198 |
|
|
| 199 |
|
Exceptions thrown on invalid input.
|
199 |
|
Exceptions thrown on invalid input.
|
| 200 |
|
|
200 |
|
|
| 201 |
|
|
201 |
|
|
| 202 |
|
The input does not contain a valid url.
|
202 |
|
The input does not contain a valid url.
|
| 203 |
|
|
203 |
|
|
| 204 |
|
@param s The string to parse.
|
204 |
|
@param s The string to parse.
|
| 205 |
|
|
205 |
|
|
| 206 |
|
|
206 |
|
|
| 207 |
|
|
207 |
|
|
| 208 |
|
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
|
208 |
|
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
|
| 209 |
|
|
209 |
|
|
| 210 |
|
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
210 |
|
relative-ref = relative-part [ "?" query ] [ "#" fragment ]
|
| 211 |
|
|
211 |
|
|
| 212 |
|
|
212 |
|
|
| 213 |
|
|
213 |
|
|
| 214 |
|
@li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.1"
|
214 |
|
@li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.1"
|
| 215 |
|
|
215 |
|
|
| 216 |
|
|
216 |
|
|
| 217 |
|
|
217 |
|
|
| 218 |
|
|
218 |
|
|
| 219 |
|
|
219 |
|
|
| 220 |
|
|
220 |
|
|
| 221 |
|
|
221 |
|
|
| 222 |
|
|
222 |
|
|
| 223 |
|
|
223 |
|
|
| 224 |
|
|
224 |
|
|
| 225 |
|
|
225 |
|
|
| 226 |
|
|
226 |
|
|
| 227 |
|
The newly constructed object contains
|
227 |
|
The newly constructed object contains
|
| 228 |
|
|
228 |
|
|
| 229 |
|
|
229 |
|
|
| 230 |
|
|
230 |
|
|
| 231 |
|
|
231 |
|
|
| 232 |
|
this->buffer() == u.buffer() && this->buffer.data() != u.buffer().data()
|
232 |
|
this->buffer() == u.buffer() && this->buffer.data() != u.buffer().data()
|
| 233 |
|
|
233 |
|
|
| 234 |
|
|
234 |
|
|
| 235 |
|
|
235 |
|
|
| 236 |
|
|
236 |
|
|
| 237 |
|
|
237 |
|
|
| 238 |
|
|
238 |
|
|
| 239 |
|
|
239 |
|
|
| 240 |
|
|
240 |
|
|
| 241 |
|
@param u The url to copy.
|
241 |
|
@param u The url to copy.
|
| 242 |
|
|
242 |
|
|
| 243 |
|
|
243 |
|
|
| 244 |
|
static_url const& u) noexcept
|
244 |
|
static_url const& u) noexcept
|
| 245 |
|
|
245 |
|
|
| 246 |
|
|
246 |
|
|
| 247 |
|
|
247 |
|
|
| 248 |
|
|
248 |
|
|
| 249 |
|
|
249 |
|
|
| 250 |
|
|
250 |
|
|
| 251 |
|
|
251 |
|
|
| 252 |
|
The newly constructed object contains
|
252 |
|
The newly constructed object contains
|
| 253 |
|
|
253 |
|
|
| 254 |
|
|
254 |
|
|
| 255 |
|
|
255 |
|
|
| 256 |
|
|
256 |
|
|
| 257 |
|
this->buffer() == u.buffer() && this->buffer.data() != u.buffer().data()
|
257 |
|
this->buffer() == u.buffer() && this->buffer.data() != u.buffer().data()
|
| 258 |
|
|
258 |
|
|
| 259 |
|
|
259 |
|
|
| 260 |
|
|
260 |
|
|
| 261 |
|
|
261 |
|
|
| 262 |
|
|
262 |
|
|
| 263 |
|
|
263 |
|
|
| 264 |
|
Exception thrown if capacity exceeded.
|
264 |
|
Exception thrown if capacity exceeded.
|
| 265 |
|
|
265 |
|
|
| 266 |
|
|
266 |
|
|
| 267 |
|
Capacity would be exceeded.
|
267 |
|
Capacity would be exceeded.
|
| 268 |
|
|
268 |
|
|
| 269 |
|
@param u The url to copy.
|
269 |
|
@param u The url to copy.
|
| 270 |
|
|
270 |
|
|
| 271 |
|
|
271 |
|
|
| 272 |
|
|
272 |
|
|
| 273 |
|
|
273 |
|
|
| 274 |
|
|
274 |
|
|
| 275 |
|
|
275 |
|
|
| 276 |
|
|
276 |
|
|
| 277 |
|
|
277 |
|
|
| 278 |
|
|
278 |
|
|
| 279 |
|
|
279 |
|
|
| 280 |
|
The contents of `u` are copied and
|
280 |
|
The contents of `u` are copied and
|
| 281 |
|
the previous contents of `this` are
|
281 |
|
the previous contents of `this` are
|
| 282 |
|
|
282 |
|
|
| 283 |
|
Capacity remains unchanged.
|
283 |
|
Capacity remains unchanged.
|
| 284 |
|
|
284 |
|
|
| 285 |
|
|
285 |
|
|
| 286 |
|
|
286 |
|
|
| 287 |
|
this->buffer() == u.buffer() && this->buffer().data() != u.buffer().data()
|
287 |
|
this->buffer() == u.buffer() && this->buffer().data() != u.buffer().data()
|
| 288 |
|
|
288 |
|
|
| 289 |
|
|
289 |
|
|
| 290 |
|
|
290 |
|
|
| 291 |
|
|
291 |
|
|
| 292 |
|
|
292 |
|
|
| 293 |
|
|
293 |
|
|
| 294 |
|
|
294 |
|
|
| 295 |
|
|
295 |
|
|
| 296 |
|
@param u The url to copy.
|
296 |
|
@param u The url to copy.
|
| 297 |
|
@return A reference to this object.
|
297 |
|
@return A reference to this object.
|
| 298 |
|
|
298 |
|
|
| 299 |
|
|
299 |
|
|
| 300 |
|
|
300 |
|
|
| 301 |
|
static_url const& u) noexcept
|
301 |
|
static_url const& u) noexcept
|
| 302 |
|
|
302 |
|
|
| 303 |
|
|
303 |
|
|
| 304 |
|
|
304 |
|
|
| 305 |
|
|
305 |
|
|
| 306 |
|
|
306 |
|
|
| 307 |
|
|
307 |
|
|
| 308 |
|
|
308 |
|
|
| 309 |
|
|
309 |
|
|
| 310 |
|
The contents of `u` are copied and
|
310 |
|
The contents of `u` are copied and
|
| 311 |
|
the previous contents of `this` are
|
311 |
|
the previous contents of `this` are
|
| 312 |
|
|
312 |
|
|
| 313 |
|
|
313 |
|
|
| 314 |
|
|
314 |
|
|
| 315 |
|
|
315 |
|
|
| 316 |
|
this->buffer() == u.buffer() && this->buffer().data() != u.buffer().data()
|
316 |
|
this->buffer() == u.buffer() && this->buffer().data() != u.buffer().data()
|
| 317 |
|
|
317 |
|
|
| 318 |
|
|
318 |
|
|
| 319 |
|
|
319 |
|
|
| 320 |
|
|
320 |
|
|
| 321 |
|
|
321 |
|
|
| 322 |
|
|
322 |
|
|
| 323 |
|
|
323 |
|
|
| 324 |
|
Exception thrown if capacity exceeded.
|
324 |
|
Exception thrown if capacity exceeded.
|
| 325 |
|
|
325 |
|
|
| 326 |
|
|
326 |
|
|
| 327 |
|
Capacity would be exceeded.
|
327 |
|
Capacity would be exceeded.
|
| 328 |
|
|
328 |
|
|
| 329 |
|
@param u The url to copy.
|
329 |
|
@param u The url to copy.
|
| 330 |
|
@return A reference to this object.
|
330 |
|
@return A reference to this object.
|
| 331 |
|
|
331 |
|
|
| 332 |
|
|
332 |
|
|
| 333 |
|
|
333 |
|
|
| 334 |
|
|
334 |
|
|
| 335 |
|
|
335 |
|
|
| 336 |
|
|
336 |
|
|
| 337 |
|
|
337 |
|
|
| 338 |
|
|
338 |
|
|
| 339 |
|
|
339 |
|
|
| 340 |
|
|
340 |
|
|
| 341 |
|
//--------------------------------------------
|
341 |
|
//--------------------------------------------
|
| 342 |
|
|
342 |
|
|
| 343 |
|
|
343 |
|
|
| 344 |
|
|
344 |
|
|
| 345 |
|
|
345 |
|
|
| 346 |
|
/// @copydoc url_base::set_scheme
|
346 |
|
/// @copydoc url_base::set_scheme
|
| 347 |
|
static_url& set_scheme(core::string_view s) { url_base::set_scheme(s); return *this; }
|
347 |
|
static_url& set_scheme(core::string_view s) { url_base::set_scheme(s); return *this; }
|
| 348 |
|
/// @copydoc url_base::set_scheme_id
|
348 |
|
/// @copydoc url_base::set_scheme_id
|
| 349 |
|
static_url& set_scheme_id(urls::scheme id) { url_base::set_scheme_id(id); return *this; }
|
349 |
|
static_url& set_scheme_id(urls::scheme id) { url_base::set_scheme_id(id); return *this; }
|
| 350 |
|
/// @copydoc url_base::remove_scheme
|
350 |
|
/// @copydoc url_base::remove_scheme
|
| 351 |
|
static_url& remove_scheme() { url_base::remove_scheme(); return *this; }
|
351 |
|
static_url& remove_scheme() { url_base::remove_scheme(); return *this; }
|
| 352 |
|
|
352 |
|
|
| 353 |
|
/// @copydoc url_base::set_encoded_authority
|
353 |
|
/// @copydoc url_base::set_encoded_authority
|
| 354 |
|
static_url& set_encoded_authority(pct_string_view s) { url_base::set_encoded_authority(s); return *this; }
|
354 |
|
static_url& set_encoded_authority(pct_string_view s) { url_base::set_encoded_authority(s); return *this; }
|
| 355 |
|
/// @copydoc url_base::remove_authority
|
355 |
|
/// @copydoc url_base::remove_authority
|
| 356 |
|
static_url& remove_authority() { url_base::remove_authority(); return *this; }
|
356 |
|
static_url& remove_authority() { url_base::remove_authority(); return *this; }
|
| 357 |
|
|
357 |
|
|
| 358 |
|
/// @copydoc url_base::set_userinfo
|
358 |
|
/// @copydoc url_base::set_userinfo
|
| 359 |
|
static_url& set_userinfo(core::string_view s) { url_base::set_userinfo(s); return *this; }
|
359 |
|
static_url& set_userinfo(core::string_view s) { url_base::set_userinfo(s); return *this; }
|
| 360 |
|
/// @copydoc url_base::set_encoded_userinfo
|
360 |
|
/// @copydoc url_base::set_encoded_userinfo
|
| 361 |
|
static_url& set_encoded_userinfo(pct_string_view s) { url_base::set_encoded_userinfo(s); return *this; }
|
361 |
|
static_url& set_encoded_userinfo(pct_string_view s) { url_base::set_encoded_userinfo(s); return *this; }
|
| 362 |
|
/// @copydoc url_base::remove_userinfo
|
362 |
|
/// @copydoc url_base::remove_userinfo
|
| 363 |
|
static_url& remove_userinfo() noexcept { url_base::remove_userinfo(); return *this; }
|
363 |
|
static_url& remove_userinfo() noexcept { url_base::remove_userinfo(); return *this; }
|
| 364 |
|
/// @copydoc url_base::set_user
|
364 |
|
/// @copydoc url_base::set_user
|
| 365 |
|
static_url& set_user(core::string_view s) { url_base::set_user(s); return *this; }
|
365 |
|
static_url& set_user(core::string_view s) { url_base::set_user(s); return *this; }
|
| 366 |
|
/// @copydoc url_base::set_encoded_user
|
366 |
|
/// @copydoc url_base::set_encoded_user
|
| 367 |
|
static_url& set_encoded_user(pct_string_view s) { url_base::set_encoded_user(s); return *this; }
|
367 |
|
static_url& set_encoded_user(pct_string_view s) { url_base::set_encoded_user(s); return *this; }
|
| 368 |
|
/// @copydoc url_base::set_password
|
368 |
|
/// @copydoc url_base::set_password
|
| 369 |
|
static_url& set_password(core::string_view s) { url_base::set_password(s); return *this; }
|
369 |
|
static_url& set_password(core::string_view s) { url_base::set_password(s); return *this; }
|
| 370 |
|
/// @copydoc url_base::set_encoded_password
|
370 |
|
/// @copydoc url_base::set_encoded_password
|
| 371 |
|
static_url& set_encoded_password(pct_string_view s) { url_base::set_encoded_password(s); return *this; }
|
371 |
|
static_url& set_encoded_password(pct_string_view s) { url_base::set_encoded_password(s); return *this; }
|
| 372 |
|
/// @copydoc url_base::remove_password
|
372 |
|
/// @copydoc url_base::remove_password
|
| 373 |
|
static_url& remove_password() noexcept { url_base::remove_password(); return *this; }
|
373 |
|
static_url& remove_password() noexcept { url_base::remove_password(); return *this; }
|
| 374 |
|
|
374 |
|
|
| 375 |
|
/// @copydoc url_base::set_host
|
375 |
|
/// @copydoc url_base::set_host
|
| 376 |
|
static_url& set_host(core::string_view s) { url_base::set_host(s); return *this; }
|
376 |
|
static_url& set_host(core::string_view s) { url_base::set_host(s); return *this; }
|
| 377 |
|
/// @copydoc url_base::set_encoded_host
|
377 |
|
/// @copydoc url_base::set_encoded_host
|
| 378 |
|
static_url& set_encoded_host(pct_string_view s) { url_base::set_encoded_host(s); return *this; }
|
378 |
|
static_url& set_encoded_host(pct_string_view s) { url_base::set_encoded_host(s); return *this; }
|
| 379 |
|
/// @copydoc url_base::set_host_address
|
379 |
|
/// @copydoc url_base::set_host_address
|
| 380 |
|
static_url& set_host_address(core::string_view s) { url_base::set_host_address(s); return *this; }
|
380 |
|
static_url& set_host_address(core::string_view s) { url_base::set_host_address(s); return *this; }
|
| 381 |
|
/// @copydoc url_base::set_encoded_host_address
|
381 |
|
/// @copydoc url_base::set_encoded_host_address
|
| 382 |
|
static_url& set_encoded_host_address(pct_string_view s) { url_base::set_encoded_host_address(s); return *this; }
|
382 |
|
static_url& set_encoded_host_address(pct_string_view s) { url_base::set_encoded_host_address(s); return *this; }
|
| 383 |
|
/// @copydoc url_base::set_host_ipv4
|
383 |
|
/// @copydoc url_base::set_host_ipv4
|
| 384 |
|
static_url& set_host_ipv4(ipv4_address const& addr) { url_base::set_host_ipv4(addr); return *this; }
|
384 |
|
static_url& set_host_ipv4(ipv4_address const& addr) { url_base::set_host_ipv4(addr); return *this; }
|
| 385 |
|
/// @copydoc url_base::set_host_ipv6
|
385 |
|
/// @copydoc url_base::set_host_ipv6
|
| 386 |
|
static_url& set_host_ipv6(ipv6_address const& addr) { url_base::set_host_ipv6(addr); return *this; }
|
386 |
|
static_url& set_host_ipv6(ipv6_address const& addr) { url_base::set_host_ipv6(addr); return *this; }
|
| 387 |
|
/// @copydoc url_base::set_zone_id
|
387 |
|
/// @copydoc url_base::set_zone_id
|
| 388 |
|
static_url& set_zone_id(core::string_view s) { url_base::set_zone_id(s); return *this; }
|
388 |
|
static_url& set_zone_id(core::string_view s) { url_base::set_zone_id(s); return *this; }
|
| 389 |
|
/// @copydoc url_base::set_encoded_zone_id
|
389 |
|
/// @copydoc url_base::set_encoded_zone_id
|
| 390 |
|
static_url& set_encoded_zone_id(pct_string_view const& s) { url_base::set_encoded_zone_id(s); return *this; }
|
390 |
|
static_url& set_encoded_zone_id(pct_string_view const& s) { url_base::set_encoded_zone_id(s); return *this; }
|
| 391 |
|
/// @copydoc url_base::set_host_ipvfuture
|
391 |
|
/// @copydoc url_base::set_host_ipvfuture
|
| 392 |
|
static_url& set_host_ipvfuture(core::string_view s) { url_base::set_host_ipvfuture(s); return *this; }
|
392 |
|
static_url& set_host_ipvfuture(core::string_view s) { url_base::set_host_ipvfuture(s); return *this; }
|
| 393 |
|
/// @copydoc url_base::set_host_name
|
393 |
|
/// @copydoc url_base::set_host_name
|
| 394 |
|
static_url& set_host_name(core::string_view s) { url_base::set_host_name(s); return *this; }
|
394 |
|
static_url& set_host_name(core::string_view s) { url_base::set_host_name(s); return *this; }
|
| 395 |
|
/// @copydoc url_base::set_encoded_host_name
|
395 |
|
/// @copydoc url_base::set_encoded_host_name
|
| 396 |
|
static_url& set_encoded_host_name(pct_string_view s) { url_base::set_encoded_host_name(s); return *this; }
|
396 |
|
static_url& set_encoded_host_name(pct_string_view s) { url_base::set_encoded_host_name(s); return *this; }
|
| 397 |
|
/// @copydoc url_base::set_port_number
|
397 |
|
/// @copydoc url_base::set_port_number
|
| 398 |
|
static_url& set_port_number(std::uint16_t n) { url_base::set_port_number(n); return *this; }
|
398 |
|
static_url& set_port_number(std::uint16_t n) { url_base::set_port_number(n); return *this; }
|
| 399 |
|
/// @copydoc url_base::set_port
|
399 |
|
/// @copydoc url_base::set_port
|
| 400 |
|
static_url& set_port(core::string_view s) { url_base::set_port(s); return *this; }
|
400 |
|
static_url& set_port(core::string_view s) { url_base::set_port(s); return *this; }
|
| 401 |
|
/// @copydoc url_base::remove_port
|
401 |
|
/// @copydoc url_base::remove_port
|
| 402 |
|
static_url& remove_port() noexcept { url_base::remove_port(); return *this; }
|
402 |
|
static_url& remove_port() noexcept { url_base::remove_port(); return *this; }
|
| 403 |
|
|
403 |
|
|
| 404 |
|
/// @copydoc url_base::set_path_absolute
|
404 |
|
/// @copydoc url_base::set_path_absolute
|
| 405 |
|
//bool set_path_absolute(bool absolute);
|
405 |
|
//bool set_path_absolute(bool absolute);
|
| 406 |
|
/// @copydoc url_base::set_path
|
406 |
|
/// @copydoc url_base::set_path
|
| 407 |
|
static_url& set_path(core::string_view s) { url_base::set_path(s); return *this; }
|
407 |
|
static_url& set_path(core::string_view s) { url_base::set_path(s); return *this; }
|
| 408 |
|
/// @copydoc url_base::set_encoded_path
|
408 |
|
/// @copydoc url_base::set_encoded_path
|
| 409 |
|
static_url& set_encoded_path(pct_string_view s) { url_base::set_encoded_path(s); return *this; }
|
409 |
|
static_url& set_encoded_path(pct_string_view s) { url_base::set_encoded_path(s); return *this; }
|
| 410 |
|
|
410 |
|
|
| 411 |
|
/// @copydoc url_base::set_query
|
411 |
|
/// @copydoc url_base::set_query
|
| 412 |
|
static_url& set_query(core::string_view s) { url_base::set_query(s); return *this; }
|
412 |
|
static_url& set_query(core::string_view s) { url_base::set_query(s); return *this; }
|
| 413 |
|
/// @copydoc url_base::set_encoded_query
|
413 |
|
/// @copydoc url_base::set_encoded_query
|
| 414 |
|
static_url& set_encoded_query(pct_string_view s) { url_base::set_encoded_query(s); return *this; }
|
414 |
|
static_url& set_encoded_query(pct_string_view s) { url_base::set_encoded_query(s); return *this; }
|
| 415 |
|
/// @copydoc url_base::set_params
|
415 |
|
/// @copydoc url_base::set_params
|
| 416 |
|
static_url& set_params(std::initializer_list<param_view> ps, encoding_opts opts = {}) { url_base::set_params(ps, opts); return *this; }
|
416 |
|
static_url& set_params(std::initializer_list<param_view> ps, encoding_opts opts = {}) { url_base::set_params(ps, opts); return *this; }
|
| 417 |
|
/// @copydoc url_base::remove_query
|
417 |
|
/// @copydoc url_base::remove_query
|
| 418 |
|
static_url& remove_query() noexcept { url_base::remove_query(); return *this; }
|
418 |
|
static_url& remove_query() noexcept { url_base::remove_query(); return *this; }
|
| 419 |
|
|
419 |
|
|
| 420 |
|
/// @copydoc url_base::remove_fragment
|
420 |
|
/// @copydoc url_base::remove_fragment
|
| 421 |
|
static_url& remove_fragment() noexcept { url_base::remove_fragment(); return *this; }
|
421 |
|
static_url& remove_fragment() noexcept { url_base::remove_fragment(); return *this; }
|
| 422 |
|
/// @copydoc url_base::set_fragment
|
422 |
|
/// @copydoc url_base::set_fragment
|
| 423 |
|
static_url& set_fragment(core::string_view s) { url_base::set_fragment(s); return *this; }
|
423 |
|
static_url& set_fragment(core::string_view s) { url_base::set_fragment(s); return *this; }
|
| 424 |
|
/// @copydoc url_base::set_encoded_fragment
|
424 |
|
/// @copydoc url_base::set_encoded_fragment
|
| 425 |
|
static_url& set_encoded_fragment(pct_string_view s) { url_base::set_encoded_fragment(s); return *this; }
|
425 |
|
static_url& set_encoded_fragment(pct_string_view s) { url_base::set_encoded_fragment(s); return *this; }
|
| 426 |
|
|
426 |
|
|
| 427 |
|
/// @copydoc url_base::remove_origin
|
427 |
|
/// @copydoc url_base::remove_origin
|
| 428 |
|
static_url& remove_origin() { url_base::remove_origin(); return *this; }
|
428 |
|
static_url& remove_origin() { url_base::remove_origin(); return *this; }
|
| 429 |
|
|
429 |
|
|
| 430 |
|
/// @copydoc url_base::normalize
|
430 |
|
/// @copydoc url_base::normalize
|
| 431 |
|
static_url& normalize() { url_base::normalize(); return *this; }
|
431 |
|
static_url& normalize() { url_base::normalize(); return *this; }
|
| 432 |
|
/// @copydoc url_base::normalize_scheme
|
432 |
|
/// @copydoc url_base::normalize_scheme
|
| 433 |
|
static_url& normalize_scheme() { url_base::normalize_scheme(); return *this; }
|
433 |
|
static_url& normalize_scheme() { url_base::normalize_scheme(); return *this; }
|
| 434 |
|
/// @copydoc url_base::normalize_authority
|
434 |
|
/// @copydoc url_base::normalize_authority
|
| 435 |
|
static_url& normalize_authority() { url_base::normalize_authority(); return *this; }
|
435 |
|
static_url& normalize_authority() { url_base::normalize_authority(); return *this; }
|
| 436 |
|
/// @copydoc url_base::normalize_path
|
436 |
|
/// @copydoc url_base::normalize_path
|
| 437 |
|
static_url& normalize_path() { url_base::normalize_path(); return *this; }
|
437 |
|
static_url& normalize_path() { url_base::normalize_path(); return *this; }
|
| 438 |
|
/// @copydoc url_base::normalize_query
|
438 |
|
/// @copydoc url_base::normalize_query
|
| 439 |
|
static_url& normalize_query() { url_base::normalize_query(); return *this; }
|
439 |
|
static_url& normalize_query() { url_base::normalize_query(); return *this; }
|
| 440 |
|
/// @copydoc url_base::normalize_fragment
|
440 |
|
/// @copydoc url_base::normalize_fragment
|
| 441 |
|
static_url& normalize_fragment() { url_base::normalize_fragment(); return *this; }
|
441 |
|
static_url& normalize_fragment() { url_base::normalize_fragment(); return *this; }
|
| 442 |
|
|
442 |
|
|
| 443 |
|
//--------------------------------------------
|
443 |
|
//--------------------------------------------
|
| 444 |
|
|
444 |
|
|
| 445 |
|
|
445 |
|
|
| 446 |
|
|
446 |
|
|
| 447 |
|
|
447 |
|
|
| 448 |
|
|
448 |
|
|
| 449 |
|
//------------------------------------------------
|
449 |
|
//------------------------------------------------
|
| 450 |
|
|
450 |
|
|
| 451 |
|
// std::hash specialization
|
451 |
|
// std::hash specialization
|
| 452 |
|
|
452 |
|
|
| 453 |
|
|
453 |
|
|
| 454 |
|
|
454 |
|
|
| 455 |
|
struct hash< ::boost::urls::static_url<N> >
|
455 |
|
struct hash< ::boost::urls::static_url<N> >
|
| 456 |
|
|
456 |
|
|
| 457 |
|
|
457 |
|
|
| 458 |
|
hash(hash const&) = default;
|
458 |
|
hash(hash const&) = default;
|
| 459 |
|
hash& operator=(hash const&) = default;
|
459 |
|
hash& operator=(hash const&) = default;
|
| 460 |
|
|
460 |
|
|
| 461 |
|
|
461 |
|
|
| 462 |
|
hash(std::size_t salt) noexcept
|
462 |
|
hash(std::size_t salt) noexcept
|
| 463 |
|
|
463 |
|
|
| 464 |
|
|
464 |
|
|
| 465 |
|
|
465 |
|
|
| 466 |
|
|
466 |
|
|
| 467 |
|
|
467 |
|
|
| 468 |
|
operator()(::boost::urls::static_url<N> const& u) const noexcept
|
468 |
|
operator()(::boost::urls::static_url<N> const& u) const noexcept
|
| 469 |
|
|
469 |
|
|
| 470 |
|
|
470 |
|
|
| 471 |
|
|
471 |
|
|
| 472 |
|
|
472 |
|
|
| 473 |
|
|
473 |
|
|
| 474 |
|
|
474 |
|
|
| 475 |
|
|
475 |
|
|
| 476 |
|
|
476 |
|
|
| 477 |
|
|
477 |
|
|
| 478 |
|
|
478 |
|
|
| 479 |
|
|
479 |
|
|