libs/url/src/detail/url_impl.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2022 Vinnie Falco (vinnie.falco@gmail.com) | ||
| 3 | // | ||
| 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) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/boostorg/url | ||
| 8 | // | ||
| 9 | |||
| 10 | |||
| 11 | #include <boost/url/detail/config.hpp> | ||
| 12 | #include "path.hpp" | ||
| 13 | #include <boost/url/detail/url_impl.hpp> | ||
| 14 | #include <boost/url/authority_view.hpp> | ||
| 15 | #include <boost/assert.hpp> | ||
| 16 | #include <cstring> | ||
| 17 | |||
| 18 | namespace boost { | ||
| 19 | namespace urls { | ||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | #if defined(__GNUC__) && ! defined(__clang__) && defined(__MINGW32__) | ||
| 23 | #pragma GCC diagnostic push | ||
| 24 | #pragma GCC diagnostic ignored "-Warray-bounds" | ||
| 25 | #endif | ||
| 26 | |||
| 27 | //------------------------------------------------ | ||
| 28 | // | ||
| 29 | // url_impl | ||
| 30 | // | ||
| 31 | //------------------------------------------------ | ||
| 32 | |||
| 33 | void | ||
| 34 | 2422 | url_impl:: | |
| 35 | apply_scheme( | ||
| 36 | core::string_view s) noexcept | ||
| 37 | { | ||
| 38 | 2422 | scheme_ = string_to_scheme(s); | |
| 39 | 2422 | set_size(id_scheme, s.size() + 1); | |
| 40 | 2422 | } | |
| 41 | |||
| 42 | void | ||
| 43 | 405 | url_impl:: | |
| 44 | apply_userinfo( | ||
| 45 | pct_string_view const& user, | ||
| 46 | pct_string_view const* pass) noexcept | ||
| 47 | { | ||
| 48 | // this function is for | ||
| 49 | // authority_view_rule only | ||
| 50 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 405 times.
|
405 | BOOST_ASSERT(from_ == from::authority); |
| 51 | |||
| 52 | // userinfo | ||
| 53 | 405 | set_size(id_user, user.size()); | |
| 54 | 405 | decoded_[id_user] = | |
| 55 | 405 | user.decoded_size(); | |
| 56 |
2/2✓ Branch 0 taken 270 times.
✓ Branch 1 taken 135 times.
|
405 | if(pass) |
| 57 | { | ||
| 58 | 270 | set_size(id_pass, | |
| 59 | 270 | pass->size() + 2); | |
| 60 | 270 | decoded_[id_pass] = | |
| 61 | 270 | pass->decoded_size(); | |
| 62 | } | ||
| 63 | else | ||
| 64 | { | ||
| 65 | // trailing '@' | ||
| 66 | 135 | set_size(id_pass, 1 ); | |
| 67 | } | ||
| 68 | 405 | } | |
| 69 | |||
| 70 | void | ||
| 71 | 2013 | url_impl:: | |
| 72 | apply_host( | ||
| 73 | host_type ht, | ||
| 74 | pct_string_view s, | ||
| 75 | unsigned char const* addr) noexcept | ||
| 76 | { | ||
| 77 | // this function is for | ||
| 78 | // authority_view_rule only | ||
| 79 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2013 times.
|
2013 | BOOST_ASSERT(from_ == from::authority); |
| 80 | |||
| 81 | // host, port | ||
| 82 | 2013 | host_type_ = ht; | |
| 83 | 2013 | set_size(id_host, s.size()); | |
| 84 | 2013 | decoded_[id_host] = | |
| 85 | 2013 | s.decoded_size(); | |
| 86 | 2013 | std::memcpy( | |
| 87 | 2013 | ip_addr_, | |
| 88 | addr, | ||
| 89 | sizeof(ip_addr_)); | ||
| 90 | 2013 | } | |
| 91 | |||
| 92 | void | ||
| 93 | 282 | url_impl:: | |
| 94 | apply_port( | ||
| 95 | core::string_view s, | ||
| 96 | unsigned short pn) noexcept | ||
| 97 | { | ||
| 98 | // this function is for | ||
| 99 | // authority_view_rule only | ||
| 100 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 282 times.
|
282 | BOOST_ASSERT(from_ == from::authority); |
| 101 | |||
| 102 | 282 | port_number_ = pn; | |
| 103 | 282 | set_size(id_port, 1 + s.size()); | |
| 104 | 282 | } | |
| 105 | |||
| 106 | void | ||
| 107 | 1953 | url_impl:: | |
| 108 | apply_authority( | ||
| 109 | authority_view const& a) noexcept | ||
| 110 | { | ||
| 111 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1953 times.
|
1953 | BOOST_ASSERT(from_ != from::authority); |
| 112 | |||
| 113 | // userinfo | ||
| 114 | 1953 | set_size(id_user, | |
| 115 | 1953 | a.u_.len(id_user) + | |
| 116 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1953 times.
|
1953 | (from_ == from::authority ? 0 : 2)); |
| 117 | 1953 | set_size(id_pass, a.u_.len(id_pass)); | |
| 118 | 1953 | decoded_[id_user] = a.u_.decoded_[id_user]; | |
| 119 | 1953 | decoded_[id_pass] = a.u_.decoded_[id_pass]; | |
| 120 | |||
| 121 | // host, port | ||
| 122 | 1953 | host_type_ = a.u_.host_type_; | |
| 123 | 1953 | port_number_ = a.u_.port_number_; | |
| 124 | 1953 | set_size(id_host, a.u_.len(id_host)); | |
| 125 | 1953 | set_size(id_port, a.u_.len(id_port)); | |
| 126 | 1953 | std::memcpy( | |
| 127 | 1953 | ip_addr_, | |
| 128 | 1953 | a.u_.ip_addr_, | |
| 129 | sizeof(ip_addr_)); | ||
| 130 | 1953 | decoded_[id_host] = a.u_.decoded_[id_host]; | |
| 131 | 1953 | } | |
| 132 | |||
| 133 | void | ||
| 134 | 3719 | url_impl:: | |
| 135 | apply_path( | ||
| 136 | pct_string_view s, | ||
| 137 | std::size_t nseg) noexcept | ||
| 138 | { | ||
| 139 | 3719 | set_size(id_path, s.size()); | |
| 140 | 3719 | decoded_[id_path] = s.decoded_size(); | |
| 141 | 3719 | nseg_ = detail::path_segments(s, nseg); | |
| 142 | 3719 | } | |
| 143 | |||
| 144 | void | ||
| 145 | 482 | url_impl:: | |
| 146 | apply_query( | ||
| 147 | pct_string_view s, | ||
| 148 | std::size_t n) noexcept | ||
| 149 | { | ||
| 150 | 482 | nparam_ = n; | |
| 151 | 482 | set_size(id_query, 1 + s.size()); | |
| 152 | 482 | decoded_[id_query] = s.decoded_size(); | |
| 153 | 482 | } | |
| 154 | |||
| 155 | void | ||
| 156 | 241 | url_impl:: | |
| 157 | apply_frag( | ||
| 158 | pct_string_view s) noexcept | ||
| 159 | { | ||
| 160 | 241 | set_size(id_frag, s.size() + 1); | |
| 161 | 241 | decoded_[id_frag] = s.decoded_size(); | |
| 162 | 241 | } | |
| 163 | |||
| 164 | // return length of [first, last) | ||
| 165 | auto | ||
| 166 | 20889 | url_impl:: | |
| 167 | len( | ||
| 168 | int first, | ||
| 169 | int last) const noexcept -> | ||
| 170 | std::size_t | ||
| 171 | { | ||
| 172 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 20889 times.
|
20889 | BOOST_ASSERT(first <= last); |
| 173 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 20889 times.
|
20889 | BOOST_ASSERT(last <= id_end); |
| 174 | 20889 | return offset(last) - offset(first); | |
| 175 | } | ||
| 176 | |||
| 177 | // return length of part | ||
| 178 | auto | ||
| 179 | 275912 | url_impl:: | |
| 180 | len(int id) const noexcept -> | ||
| 181 | std::size_t | ||
| 182 | { | ||
| 183 | return id == id_end | ||
| 184 |
1/2✓ Branch 0 taken 275912 times.
✗ Branch 1 not taken.
|
551824 | ? zero_ |
| 185 | 275912 | : ( offset(id + 1) - | |
| 186 | 551824 | offset(id) ); | |
| 187 | } | ||
| 188 | |||
| 189 | // return offset of id | ||
| 190 | auto | ||
| 191 | 721806 | url_impl:: | |
| 192 | offset(int id) const noexcept -> | ||
| 193 | std::size_t | ||
| 194 | { | ||
| 195 | return | ||
| 196 | id == id_scheme | ||
| 197 |
2/2✓ Branch 0 taken 667618 times.
✓ Branch 1 taken 54188 times.
|
721806 | ? zero_ |
| 198 | 721806 | : offset_[id]; | |
| 199 | } | ||
| 200 | |||
| 201 | // return id as string | ||
| 202 | core::string_view | ||
| 203 | 49275 | url_impl:: | |
| 204 | get(int id) const noexcept | ||
| 205 | { | ||
| 206 | return { | ||
| 207 | 49275 | cs_ + offset(id), len(id) }; | |
| 208 | } | ||
| 209 | |||
| 210 | // return [first, last) as string | ||
| 211 | core::string_view | ||
| 212 | 926 | url_impl:: | |
| 213 | get(int first, | ||
| 214 | int last) const noexcept | ||
| 215 | { | ||
| 216 | 926 | return { cs_ + offset(first), | |
| 217 | 926 | offset(last) - offset(first) }; | |
| 218 | } | ||
| 219 | |||
| 220 | // return id as pct-string | ||
| 221 | pct_string_view | ||
| 222 | 2309 | url_impl:: | |
| 223 | pct_get( | ||
| 224 | int id) const noexcept | ||
| 225 | { | ||
| 226 | 2309 | return make_pct_string_view_unsafe( | |
| 227 | 2309 | cs_ + offset(id), | |
| 228 | len(id), | ||
| 229 | 4618 | decoded_[id]); | |
| 230 | } | ||
| 231 | |||
| 232 | // return [first, last) as pct-string | ||
| 233 | pct_string_view | ||
| 234 | 120 | url_impl:: | |
| 235 | pct_get( | ||
| 236 | int first, | ||
| 237 | int last) const noexcept | ||
| 238 | { | ||
| 239 | 120 | auto const pos = offset(first); | |
| 240 | 120 | std::size_t n = 0; | |
| 241 |
2/2✓ Branch 0 taken 240 times.
✓ Branch 1 taken 120 times.
|
360 | for(auto i = first; i < last;) |
| 242 | 240 | n += decoded_[i++]; | |
| 243 | 120 | return make_pct_string_view_unsafe( | |
| 244 | 120 | cs_ + pos, | |
| 245 | 120 | offset(last) - pos, | |
| 246 | 120 | n); | |
| 247 | } | ||
| 248 | |||
| 249 | //------------------------------------------------ | ||
| 250 | |||
| 251 | // change id to size n | ||
| 252 | void | ||
| 253 | 20564 | url_impl:: | |
| 254 | set_size( | ||
| 255 | int id, | ||
| 256 | std::size_t n) noexcept | ||
| 257 | { | ||
| 258 | 20564 | auto d = n - len(id); | |
| 259 | 20564 | for(auto i = id + 1; | |
| 260 |
2/2✓ Branch 0 taken 104477 times.
✓ Branch 1 taken 20564 times.
|
125041 | i <= id_end; ++i) |
| 261 | 104477 | offset_[i] += d; | |
| 262 | 20564 | } | |
| 263 | |||
| 264 | // trim id to size n, | ||
| 265 | // moving excess into id+1 | ||
| 266 | void | ||
| 267 | 861 | url_impl:: | |
| 268 | split( | ||
| 269 | int id, | ||
| 270 | std::size_t n) noexcept | ||
| 271 | { | ||
| 272 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 861 times.
|
861 | BOOST_ASSERT(id < id_end - 1); |
| 273 | //BOOST_ASSERT(n <= len(id)); | ||
| 274 | 861 | offset_[id + 1] = offset(id) + n; | |
| 275 | 861 | } | |
| 276 | |||
| 277 | // add n to [first, last] | ||
| 278 | void | ||
| 279 | 957 | url_impl:: | |
| 280 | adjust_right( | ||
| 281 | int first, | ||
| 282 | int last, | ||
| 283 | std::size_t n) noexcept | ||
| 284 | { | ||
| 285 | 957 | for(int i = first; | |
| 286 |
2/2✓ Branch 0 taken 4617 times.
✓ Branch 1 taken 957 times.
|
5574 | i <= last; ++i) |
| 287 | 4617 | offset_[i] += n; | |
| 288 | 957 | } | |
| 289 | |||
| 290 | // remove n from [first, last] | ||
| 291 | void | ||
| 292 | 721 | url_impl:: | |
| 293 | adjust_left( | ||
| 294 | int first, | ||
| 295 | int last, | ||
| 296 | std::size_t n) noexcept | ||
| 297 | { | ||
| 298 | 721 | for(int i = first; | |
| 299 |
2/2✓ Branch 0 taken 2837 times.
✓ Branch 1 taken 721 times.
|
3558 | i <= last; ++i) |
| 300 | 2837 | offset_[i] -= n; | |
| 301 | 721 | } | |
| 302 | |||
| 303 | // set [first, last) offset | ||
| 304 | void | ||
| 305 | 1659 | url_impl:: | |
| 306 | collapse( | ||
| 307 | int first, | ||
| 308 | int last, | ||
| 309 | std::size_t n) noexcept | ||
| 310 | { | ||
| 311 | 1659 | for(int i = first + 1; | |
| 312 |
2/2✓ Branch 0 taken 547 times.
✓ Branch 1 taken 1659 times.
|
2206 | i < last; ++i) |
| 313 | 547 | offset_[i] = n; | |
| 314 | 1659 | } | |
| 315 | |||
| 316 | |||
| 317 | //------------------------------------------------ | ||
| 318 | // | ||
| 319 | // path_ref | ||
| 320 | // | ||
| 321 | //------------------------------------------------ | ||
| 322 | |||
| 323 | 2096 | path_ref:: | |
| 324 | path_ref( | ||
| 325 | 2096 | url_impl const& impl) noexcept | |
| 326 | { | ||
| 327 |
2/2✓ Branch 0 taken 1594 times.
✓ Branch 1 taken 502 times.
|
2096 | if(impl.from_ == url_impl::from::url) |
| 328 | { | ||
| 329 | 1594 | impl_ = &impl; | |
| 330 | } | ||
| 331 | else | ||
| 332 | { | ||
| 333 | 502 | core::string_view s = impl.get(id_path); | |
| 334 | 502 | data_ = s.data(); | |
| 335 | 502 | size_ = s.size(); | |
| 336 | 502 | nseg_ = impl.nseg_; | |
| 337 | 502 | dn_ = impl.decoded_[id_path]; | |
| 338 | } | ||
| 339 | 2096 | } | |
| 340 | |||
| 341 | 181 | path_ref:: | |
| 342 | path_ref( | ||
| 343 | core::string_view s, | ||
| 344 | std::size_t dn, | ||
| 345 | 181 | std::size_t nseg) noexcept | |
| 346 | 362 | : data_(s.data()) | |
| 347 | 181 | , size_(s.size()) | |
| 348 | 181 | , nseg_(nseg) | |
| 349 | 181 | , dn_(dn) | |
| 350 | { | ||
| 351 | 181 | } | |
| 352 | |||
| 353 | pct_string_view | ||
| 354 | 4738 | path_ref:: | |
| 355 | buffer() const noexcept | ||
| 356 | { | ||
| 357 |
2/2✓ Branch 0 taken 2392 times.
✓ Branch 1 taken 2346 times.
|
4738 | if(impl_) |
| 358 | 2392 | return make_pct_string_view_unsafe( | |
| 359 | 2392 | impl_->cs_ + | |
| 360 | 2392 | impl_->offset(id_path), | |
| 361 | 2392 | impl_->len(id_path), | |
| 362 | 4784 | impl_->decoded_[id_path]); | |
| 363 | 2346 | return make_pct_string_view_unsafe( | |
| 364 | 2346 | data_, size_, dn_); | |
| 365 | } | ||
| 366 | |||
| 367 | std::size_t | ||
| 368 | 4487 | path_ref:: | |
| 369 | size() const noexcept | ||
| 370 | { | ||
| 371 |
2/2✓ Branch 0 taken 3116 times.
✓ Branch 1 taken 1371 times.
|
4487 | if(impl_) |
| 372 | 3116 | return impl_->len(id_path); | |
| 373 | 1371 | return size_; | |
| 374 | } | ||
| 375 | |||
| 376 | char const* | ||
| 377 | 12995 | path_ref:: | |
| 378 | data() const noexcept | ||
| 379 | { | ||
| 380 |
2/2✓ Branch 0 taken 7472 times.
✓ Branch 1 taken 5523 times.
|
12995 | if(impl_) |
| 381 | 7472 | return impl_->cs_ + | |
| 382 | 7472 | impl_->offset(id_path); | |
| 383 | 5523 | return data_; | |
| 384 | } | ||
| 385 | |||
| 386 | char const* | ||
| 387 | 4460 | path_ref:: | |
| 388 | end() const noexcept | ||
| 389 | { | ||
| 390 |
2/2✓ Branch 0 taken 2842 times.
✓ Branch 1 taken 1618 times.
|
4460 | if(impl_) |
| 391 | 2842 | return impl_->cs_ + | |
| 392 | 2842 | impl_->offset(id_query); | |
| 393 | 1618 | return data_ + size_; | |
| 394 | } | ||
| 395 | |||
| 396 | std::size_t | ||
| 397 | 9622 | path_ref:: | |
| 398 | nseg() const noexcept | ||
| 399 | { | ||
| 400 |
2/2✓ Branch 0 taken 6161 times.
✓ Branch 1 taken 3461 times.
|
9622 | if(impl_) |
| 401 | 6161 | return impl_->nseg_; | |
| 402 | 3461 | return nseg_; | |
| 403 | } | ||
| 404 | |||
| 405 | std::size_t | ||
| 406 | 2040 | path_ref:: | |
| 407 | decoded_size() const noexcept | ||
| 408 | { | ||
| 409 |
2/2✓ Branch 0 taken 1359 times.
✓ Branch 1 taken 681 times.
|
2040 | if(impl_) |
| 410 | 1359 | return impl_->decoded_[id_path]; | |
| 411 | 681 | return dn_; | |
| 412 | } | ||
| 413 | |||
| 414 | //------------------------------------------------ | ||
| 415 | // | ||
| 416 | // query_ref | ||
| 417 | // | ||
| 418 | //------------------------------------------------ | ||
| 419 | |||
| 420 | 737 | query_ref:: | |
| 421 | query_ref( | ||
| 422 | core::string_view s, | ||
| 423 | std::size_t dn, | ||
| 424 | 737 | std::size_t nparam) noexcept | |
| 425 | 1474 | : data_(s.data()) | |
| 426 | 737 | , size_(s.size()) | |
| 427 | 737 | , nparam_(nparam) | |
| 428 | 737 | , dn_(dn) | |
| 429 | { | ||
| 430 | 737 | } | |
| 431 | |||
| 432 | 479 | query_ref:: | |
| 433 | query_ref( | ||
| 434 | 479 | url_impl const& impl) noexcept | |
| 435 | { | ||
| 436 |
2/2✓ Branch 0 taken 362 times.
✓ Branch 1 taken 117 times.
|
479 | if(impl.from_ == url_impl::from::url) |
| 437 | { | ||
| 438 | 362 | impl_ = &impl; | |
| 439 | } | ||
| 440 | else | ||
| 441 | { | ||
| 442 | 117 | core::string_view s = impl.get(id_query); | |
| 443 |
2/2✓ Branch 1 taken 111 times.
✓ Branch 2 taken 6 times.
|
117 | if (!s.empty()) |
| 444 | { | ||
| 445 | 111 | s.remove_prefix(1); | |
| 446 | 111 | question_mark_ = true; | |
| 447 | } | ||
| 448 | 117 | data_ = s.data(); | |
| 449 | 117 | size_ = s.size(); | |
| 450 | 117 | nparam_ = impl.nparam_; | |
| 451 | 117 | dn_ = impl.decoded_[id_query]; | |
| 452 | } | ||
| 453 | 479 | } | |
| 454 | |||
| 455 | pct_string_view | ||
| 456 | 506 | query_ref:: | |
| 457 | buffer() const noexcept | ||
| 458 | { | ||
| 459 |
2/2✓ Branch 0 taken 2 times.
✓ Branch 1 taken 504 times.
|
506 | if(impl_) |
| 460 | { | ||
| 461 | 2 | auto pos = impl_->offset_[id_query]; | |
| 462 | 2 | auto pos1 = impl_->offset_[id_frag]; | |
| 463 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
|
2 | if(pos < pos1) |
| 464 | { | ||
| 465 | ✗ | ++pos; // no '?' | |
| 466 | ✗ | return make_pct_string_view_unsafe( | |
| 467 | ✗ | impl_->cs_ + pos, | |
| 468 | pos1 - pos, | ||
| 469 | ✗ | impl_->decoded_[id_query]); | |
| 470 | } | ||
| 471 | // empty | ||
| 472 | 2 | return make_pct_string_view_unsafe( | |
| 473 | 2 | impl_->cs_ + pos, | |
| 474 | 0, | ||
| 475 | 2 | 0); | |
| 476 | } | ||
| 477 | // no '?' | ||
| 478 | 504 | return make_pct_string_view_unsafe( | |
| 479 | 504 | data_, size_, dn_); | |
| 480 | } | ||
| 481 | |||
| 482 | // with '?' | ||
| 483 | std::size_t | ||
| 484 | 5562 | query_ref:: | |
| 485 | size() const noexcept | ||
| 486 | { | ||
| 487 |
2/2✓ Branch 0 taken 2029 times.
✓ Branch 1 taken 3533 times.
|
5562 | if(impl_) |
| 488 | 2029 | return impl_->len(id_query); | |
| 489 |
2/2✓ Branch 0 taken 3496 times.
✓ Branch 1 taken 37 times.
|
3533 | if(size_ > 0) |
| 490 | 3496 | return size_ + 1; | |
| 491 | 37 | return question_mark_; | |
| 492 | } | ||
| 493 | |||
| 494 | // no '?' | ||
| 495 | char const* | ||
| 496 | 6034 | query_ref:: | |
| 497 | begin() const noexcept | ||
| 498 | { | ||
| 499 |
2/2✓ Branch 0 taken 2288 times.
✓ Branch 1 taken 3746 times.
|
6034 | if(impl_) |
| 500 | { | ||
| 501 | // using the offset array here | ||
| 502 | 2288 | auto pos = impl_->offset_[id_query]; | |
| 503 | 2288 | auto pos1 = impl_->offset_[id_frag]; | |
| 504 |
1/2✓ Branch 0 taken 2288 times.
✗ Branch 1 not taken.
|
2288 | if(pos < pos1) |
| 505 | 2288 | return impl_->cs_ + pos + 1; // no '?' | |
| 506 | // empty | ||
| 507 | ✗ | return impl_->cs_ + pos; | |
| 508 | } | ||
| 509 | 3746 | return data_; | |
| 510 | |||
| 511 | } | ||
| 512 | |||
| 513 | char const* | ||
| 514 | 2380 | query_ref:: | |
| 515 | end() const noexcept | ||
| 516 | { | ||
| 517 |
2/2✓ Branch 0 taken 917 times.
✓ Branch 1 taken 1463 times.
|
2380 | if(impl_) |
| 518 | 917 | return impl_->cs_ + | |
| 519 | 917 | impl_->offset(id_frag); | |
| 520 | 1463 | return data_ + size_; | |
| 521 | } | ||
| 522 | |||
| 523 | std::size_t | ||
| 524 | 9344 | query_ref:: | |
| 525 | nparam() const noexcept | ||
| 526 | { | ||
| 527 |
2/2✓ Branch 0 taken 3171 times.
✓ Branch 1 taken 6173 times.
|
9344 | if(impl_) |
| 528 | 3171 | return impl_->nparam_; | |
| 529 | 6173 | return nparam_; | |
| 530 | } | ||
| 531 | |||
| 532 | #if defined(__GNUC__) && ! defined(__clang__) && defined(__MINGW32__) | ||
| 533 | #pragma GCC diagnostic pop | ||
| 534 | #endif | ||
| 535 | |||
| 536 | } // detail | ||
| 537 | } // urls | ||
| 538 | } // boost | ||
| 539 |