params_encoded_ref.hpp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020
  1. //
  2. // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
  3. // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
  4. //
  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)
  7. //
  8. // Official repository: https://github.com/boostorg/url
  9. //
  10. #ifndef BOOST_URL_PARAMS_ENCODED_REF_HPP
  11. #define BOOST_URL_PARAMS_ENCODED_REF_HPP
  12. #include <boost/url/detail/config.hpp>
  13. #include <boost/url/ignore_case.hpp>
  14. #include <boost/url/params_encoded_view.hpp>
  15. #include <initializer_list>
  16. namespace boost {
  17. namespace urls {
  18. #ifndef BOOST_URL_DOCS
  19. class url_base;
  20. class params_encoded_view;
  21. #endif
  22. /** A view representing query parameters in a URL
  23. Objects of this type are used to interpret
  24. the query parameters as a bidirectional view
  25. of key value pairs.
  26. The view does not retain ownership of the
  27. elements and instead references the original
  28. url. The caller is responsible for ensuring
  29. that the lifetime of the referenced url
  30. extends until it is no longer referenced.
  31. The view is modifiable; calling non-const
  32. members causes changes to the referenced
  33. url.
  34. @par Example
  35. @code
  36. url u( "?first=John&last=Doe" );
  37. params_encoded_ref p = u.encoded_params();
  38. @endcode
  39. Strings produced when elements are returned
  40. have type @ref param_pct_view and represent
  41. encoded strings. Strings passed to member
  42. functions may contain percent escapes, and
  43. throw exceptions on invalid inputs.
  44. @par Iterator Invalidation
  45. Changes to the underlying character buffer
  46. can invalidate iterators which reference it.
  47. Modifications made through the container
  48. invalidate some iterators to the underlying
  49. character buffer:
  50. @li @ref append : Only `end()`.
  51. @li @ref assign, @ref clear,
  52. `operator=` : All params.
  53. @li @ref erase : Erased params and all
  54. params after (including `end()`).
  55. @li @ref insert : All params at or after
  56. the insertion point (including `end()`).
  57. @li @ref replace, @ref set : Modified
  58. params and all params
  59. after (including `end()`).
  60. */
  61. class params_encoded_ref
  62. : public params_encoded_base
  63. {
  64. friend class url_base;
  65. url_base* u_ = nullptr;
  66. params_encoded_ref(
  67. url_base& u) noexcept;
  68. public:
  69. //--------------------------------------------
  70. //
  71. // Special Members
  72. //
  73. //--------------------------------------------
  74. /** Constructor
  75. After construction, both views
  76. reference the same url. Ownership is not
  77. transferred; the caller is responsible
  78. for ensuring the lifetime of the url
  79. extends until it is no longer
  80. referenced.
  81. @par Postconditions
  82. @code
  83. &this->url() == &other.url();
  84. @endcode
  85. @par Complexity
  86. Constant.
  87. @par Exception Safety
  88. Throws nothing.
  89. @param other The other view.
  90. */
  91. params_encoded_ref(
  92. params_encoded_ref const& other) = default;
  93. /** Assignment
  94. The previous contents of this are
  95. replaced by the contents of `other.
  96. <br>
  97. All iterators are invalidated.
  98. @note
  99. The strings referenced by `other`
  100. must not come from the underlying url,
  101. or else the behavior is undefined.
  102. @par Effects
  103. @code
  104. this->assign( other.begin(), other.end() );
  105. @endcode
  106. @par Complexity
  107. Linear in `other.buffer().size()`.
  108. @par Exception Safety
  109. Strong guarantee.
  110. Calls to allocate may throw.
  111. @param other The params to assign.
  112. */
  113. BOOST_URL_DECL
  114. params_encoded_ref&
  115. operator=(
  116. params_encoded_ref const& other);
  117. /** Assignment
  118. After assignment, the previous contents
  119. of the query parameters are replaced by
  120. the contents of the initializer-list.
  121. <br>
  122. All iterators are invalidated.
  123. @par Preconditions
  124. None of character buffers referenced by
  125. `init` may overlap the character buffer of
  126. the underlying url, or else the behavior
  127. is undefined.
  128. @par Effects
  129. @code
  130. this->assign( init.begin(), init.end() );
  131. @endcode
  132. @par Complexity
  133. Linear in `init.size()`.
  134. @par Exception Safety
  135. Strong guarantee.
  136. Calls to allocate may throw.
  137. Exceptions thrown on invalid input.
  138. @throw system_error
  139. `init` contains an invalid percent-encoding.
  140. @param init The list of params to assign.
  141. */
  142. BOOST_URL_DECL
  143. params_encoded_ref&
  144. operator=(std::initializer_list<
  145. param_pct_view> init);
  146. /** Conversion
  147. @par Complexity
  148. Constant.
  149. @par Exception Safety
  150. Throws nothing.
  151. */
  152. BOOST_URL_DECL
  153. operator
  154. params_encoded_view() const noexcept;
  155. //--------------------------------------------
  156. //
  157. // Observers
  158. //
  159. //--------------------------------------------
  160. /** Return the referenced url
  161. This function returns the url referenced
  162. by the view.
  163. @par Example
  164. @code
  165. url u( "?key=value" );
  166. assert( &u.encoded_params().url() == &u );
  167. @endcode
  168. @par Exception Safety
  169. @code
  170. Throws nothing.
  171. @endcode
  172. */
  173. url_base&
  174. url() const noexcept
  175. {
  176. return *u_;
  177. }
  178. //--------------------------------------------
  179. //
  180. // Modifiers
  181. //
  182. //--------------------------------------------
  183. /** Clear the contents of the container
  184. <br>
  185. All iterators are invalidated.
  186. @par Effects
  187. @code
  188. this->url().remove_query();
  189. @endcode
  190. @par Postconditions
  191. @code
  192. this->empty() == true && this->url().has_query() == false
  193. @endcode
  194. @par Complexity
  195. Constant.
  196. @par Exception Safety
  197. Throws nothing.
  198. */
  199. void
  200. clear() noexcept;
  201. //--------------------------------------------
  202. /** Assign params
  203. This function replaces the entire
  204. contents of the view with the params
  205. in the <em>initializer-list</em>.
  206. <br>
  207. All iterators are invalidated.
  208. @note
  209. The strings referenced by the inputs
  210. must not come from the underlying url,
  211. or else the behavior is undefined.
  212. @par Example
  213. @code
  214. url u;
  215. u.encoded_params().assign({ { "first", "John" }, { "last", "Doe" } });
  216. @endcode
  217. @par Complexity
  218. Linear in `init.size()`.
  219. @par Exception Safety
  220. Strong guarantee.
  221. Calls to allocate may throw.
  222. Exceptions thrown on invalid input.
  223. @throw system_error
  224. `init` contains an invalid percent-encoding.
  225. @param init The list of params to assign.
  226. */
  227. BOOST_URL_DECL
  228. void
  229. assign(
  230. std::initializer_list<
  231. param_pct_view> init);
  232. /** Assign params
  233. This function replaces the entire
  234. contents of the view with the params
  235. in the range.
  236. <br>
  237. All iterators are invalidated.
  238. @note
  239. The strings referenced by the inputs
  240. must not come from the underlying url,
  241. or else the behavior is undefined.
  242. @par Mandates
  243. @code
  244. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  245. @endcode
  246. @par Complexity
  247. Linear in the size of the range.
  248. @par Exception Safety
  249. Strong guarantee.
  250. Calls to allocate may throw.
  251. Exceptions thrown on invalid input.
  252. @throw system_error
  253. The range contains an invalid percent-encoding.
  254. @param first, last The range of params
  255. to assign.
  256. */
  257. template<class FwdIt>
  258. void
  259. assign(FwdIt first, FwdIt last);
  260. //--------------------------------------------
  261. /** Append params
  262. This function appends a param to the view.
  263. <br>
  264. The `end()` iterator is invalidated.
  265. @par Example
  266. @code
  267. url u;
  268. u.encoded_params().append( { "first", "John" } );
  269. @endcode
  270. @par Complexity
  271. Linear in `this->url().encoded_query().size()`.
  272. @par Exception Safety
  273. Strong guarantee.
  274. Calls to allocate may throw.
  275. Exceptions thrown on invalid input.
  276. @throw system_error
  277. `p` contains an invalid percent-encoding.
  278. @return An iterator to the new element.
  279. @param p The param to append.
  280. */
  281. iterator
  282. append(
  283. param_pct_view const& p);
  284. /** Append params
  285. This function appends the params in
  286. an <em>initializer-list</em> to the view.
  287. <br>
  288. The `end()` iterator is invalidated.
  289. @par Example
  290. @code
  291. url u;
  292. u.encoded_params().append({ {"first", "John"}, {"last", "Doe"} });
  293. @endcode
  294. @par Complexity
  295. Linear in `this->url().encoded_query().size()`.
  296. @par Exception Safety
  297. Strong guarantee.
  298. Calls to allocate may throw.
  299. Exceptions thrown on invalid input.
  300. @throw system_error
  301. `init` contains an invalid percent-encoding.
  302. @return An iterator to the first new element.
  303. @param init The list of params to append.
  304. */
  305. iterator
  306. append(
  307. std::initializer_list<
  308. param_pct_view> init);
  309. /** Append params
  310. This function appends a range of params
  311. to the view.
  312. <br>
  313. The `end()` iterator is invalidated.
  314. @note
  315. The strings referenced by the inputs
  316. must not come from the underlying url,
  317. or else the behavior is undefined.
  318. @par Mandates
  319. @code
  320. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  321. @endcode
  322. @par Complexity
  323. Linear in `this->url().encoded_query().size()`.
  324. @par Exception Safety
  325. Strong guarantee.
  326. Calls to allocate may throw.
  327. Exceptions thrown on invalid input.
  328. @throw system_error
  329. The range contains an invalid percent-encoding.
  330. @return An iterator to the first new element.
  331. @param first, last The range of params
  332. to append.
  333. */
  334. template<class FwdIt>
  335. iterator
  336. append(
  337. FwdIt first, FwdIt last);
  338. //--------------------------------------------
  339. /** Insert params
  340. This function inserts a param
  341. before the specified position.
  342. <br>
  343. All iterators that are equal to
  344. `before` or come after are invalidated.
  345. @par Complexity
  346. Linear in `this->url().encoded_query().size()`.
  347. @par Exception Safety
  348. Strong guarantee.
  349. Calls to allocate may throw.
  350. Exceptions thrown on invalid input.
  351. @throw system_error
  352. `p` contains an invalid percent-encoding.
  353. @return An iterator to the inserted
  354. element.
  355. @param before An iterator before which
  356. the param is inserted. This may
  357. be equal to `end()`.
  358. @param p The param to insert.
  359. */
  360. BOOST_URL_DECL
  361. iterator
  362. insert(
  363. iterator before,
  364. param_pct_view const& p);
  365. /** Insert params
  366. This function inserts the params in
  367. an <em>initializer-list</em> before
  368. the specified position.
  369. <br>
  370. All iterators that are equal to
  371. `before` or come after are invalidated.
  372. @note
  373. The strings referenced by the inputs
  374. must not come from the underlying url,
  375. or else the behavior is undefined.
  376. @par Complexity
  377. Linear in `this->url().encoded_query().size()`.
  378. @par Exception Safety
  379. Strong guarantee.
  380. Calls to allocate may throw.
  381. Exceptions thrown on invalid input.
  382. @throw system_error
  383. `init` contains an invalid percent-encoding.
  384. @return An iterator to the first
  385. element inserted, or `before` if
  386. `init.size() == 0`.
  387. @param before An iterator before which
  388. the element is inserted. This may
  389. be equal to `end()`.
  390. @param init The list of params to insert.
  391. */
  392. BOOST_URL_DECL
  393. iterator
  394. insert(
  395. iterator before,
  396. std::initializer_list<
  397. param_pct_view> init);
  398. /** Insert params
  399. This function inserts a range of
  400. params before the specified position.
  401. <br>
  402. All iterators that are equal to
  403. `before` or come after are invalidated.
  404. @note
  405. The strings referenced by the inputs
  406. must not come from the underlying url,
  407. or else the behavior is undefined.
  408. @par Mandates
  409. @code
  410. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  411. @endcode
  412. @par Complexity
  413. Linear in `this->url().encoded_query().size()`.
  414. @par Exception Safety
  415. Strong guarantee.
  416. Calls to allocate may throw.
  417. Exceptions thrown on invalid input.
  418. @throw system_error
  419. The range contains an invalid percent-encoding.
  420. @return An iterator to the first
  421. element inserted, or `before` if
  422. `first == last`.
  423. @param before An iterator before which
  424. the element is inserted. This may
  425. be equal to `end()`.
  426. @param first, last The range of params
  427. to insert.
  428. */
  429. template<class FwdIt>
  430. iterator
  431. insert(
  432. iterator before,
  433. FwdIt first,
  434. FwdIt last);
  435. //--------------------------------------------
  436. /** Erase params
  437. This function removes an element from
  438. the container.
  439. <br>
  440. All iterators that are equal to
  441. `pos` or come after are invalidated.
  442. @par Example
  443. @code
  444. url u( "?first=John&last=Doe" );
  445. params_encoded_ref::iterator it = u.encoded_params().erase( u.encoded_params().begin() );
  446. assert( u.encoded_query() == "last=Doe" );
  447. @endcode
  448. @par Complexity
  449. Linear in `this->url().encoded_query().size()`.
  450. @par Exception Safety
  451. Throws nothing.
  452. @return An iterator to one past
  453. the removed element.
  454. @param pos An iterator to the element.
  455. */
  456. iterator
  457. erase(iterator pos) noexcept;
  458. /** Erase params
  459. This function removes a range of params
  460. from the container.
  461. <br>
  462. All iterators that are equal to
  463. `first` or come after are invalidated.
  464. @par Complexity
  465. Linear in `this->url().encoded_query().size()`.
  466. @par Exception Safety
  467. Throws nothing.
  468. @return An iterator to one past
  469. the removed range.
  470. @param first, last The range of
  471. params to erase.
  472. */
  473. iterator
  474. erase(
  475. iterator first,
  476. iterator last) noexcept;
  477. /** Erase params
  478. <br>
  479. All iterators are invalidated.
  480. @par Postconditions
  481. @code
  482. this->count( key, ic ) == 0
  483. @endcode
  484. @par Complexity
  485. Linear in `this->url().encoded_query().size()`.
  486. @par Exception Safety
  487. Exceptions thrown on invalid input.
  488. @throw system_error
  489. `key` contains an invalid percent-encoding.
  490. @return The number of params removed
  491. from the container.
  492. @param key The key to match.
  493. By default, a case-sensitive
  494. comparison is used.
  495. @param ic An optional parameter. If
  496. the value @ref ignore_case is passed
  497. here, the comparison is
  498. case-insensitive.
  499. */
  500. BOOST_URL_DECL
  501. std::size_t
  502. erase(
  503. pct_string_view key,
  504. ignore_case_param ic = {}) noexcept;
  505. //--------------------------------------------
  506. /** Replace params
  507. This function replaces the contents
  508. of the element at `pos` with the
  509. specified param.
  510. <br>
  511. All iterators that are equal to
  512. `pos` or come after are invalidated.
  513. @note
  514. The strings passed in must not come
  515. from the element being replaced,
  516. or else the behavior is undefined.
  517. @par Example
  518. @code
  519. url u( "?first=John&last=Doe" );
  520. u.encoded_params().replace( u.encoded_params().begin(), { "title", "Mr" });
  521. assert( u.encoded_query() == "title=Mr&last=Doe" );
  522. @endcode
  523. @par Complexity
  524. Linear in `this->url().encoded_query().size()`.
  525. @par Exception Safety
  526. Strong guarantee.
  527. Calls to allocate may throw.
  528. Exceptions thrown on invalid input.
  529. @throw system_error
  530. `p` contains an invalid percent-encoding.
  531. @return An iterator to the element.
  532. @param pos An iterator to the element.
  533. @param p The param to assign.
  534. */
  535. BOOST_URL_DECL
  536. iterator
  537. replace(
  538. iterator pos,
  539. param_pct_view const& p);
  540. /** Replace params
  541. This function replaces a range of
  542. params with the params in an
  543. <em>initializer-list</em>.
  544. <br>
  545. All iterators that are equal to
  546. `from` or come after are invalidated.
  547. @note
  548. The strings referenced by the inputs
  549. must not come from the underlying url,
  550. or else the behavior is undefined.
  551. @par Complexity
  552. Linear in `this->url().encoded_query().size()`.
  553. @par Exception Safety
  554. Strong guarantee.
  555. Calls to allocate may throw.
  556. Exceptions thrown on invalid input.
  557. @throw system_error
  558. `init` contains an invalid percent-encoding.
  559. @return An iterator to the first
  560. element inserted, or one past `to` if
  561. `init.size() == 0`.
  562. @param from,to The range of params
  563. to replace.
  564. @param init The list of params to assign.
  565. */
  566. BOOST_URL_DECL
  567. iterator
  568. replace(
  569. iterator from,
  570. iterator to,
  571. std::initializer_list<
  572. param_pct_view> init);
  573. /** Replace params
  574. This function replaces a range of
  575. params with a range of params.
  576. <br>
  577. All iterators that are equal to
  578. `from` or come after are invalidated.
  579. @note
  580. The strings referenced by the inputs
  581. must not come from the underlying url,
  582. or else the behavior is undefined.
  583. @par Mandates
  584. @code
  585. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  586. @endcode
  587. @par Complexity
  588. Linear in `this->url().encoded_query().size()`.
  589. @par Exception Safety
  590. Strong guarantee.
  591. Calls to allocate may throw.
  592. Exceptions thrown on invalid input.
  593. @throw system_error
  594. The range contains an invalid percent-encoding.
  595. @return An iterator to the first
  596. element inserted, or one past `to` if
  597. `first == last`.
  598. @param from,to The range of params to
  599. replace.
  600. @param first, last The range of params
  601. to assign.
  602. */
  603. template<class FwdIt>
  604. iterator
  605. replace(
  606. iterator from,
  607. iterator to,
  608. FwdIt first,
  609. FwdIt last);
  610. //--------------------------------------------
  611. /** Remove the value on an element
  612. This function removes the value of
  613. an element at the specified position.
  614. After the call returns, `has_value`
  615. for the element is false.
  616. <br>
  617. All iterators that are equal to
  618. `pos` or come after are invalidated.
  619. @par Example
  620. @code
  621. url u( "?first=John&last=Doe" );
  622. u.encoded_params().unset( u.encoded_params().begin() );
  623. assert( u.encoded_query() == "first&last=Doe" );
  624. @endcode
  625. @par Complexity
  626. Linear in `this->url().encoded_query().size()`.
  627. @par Exception Safety
  628. Throws nothing.
  629. @return An iterator to the element.
  630. @param pos An iterator to the element.
  631. */
  632. BOOST_URL_DECL
  633. iterator
  634. unset(
  635. iterator pos) noexcept;
  636. /** Set a value
  637. This function replaces the value of an
  638. element at the specified position.
  639. <br>
  640. All iterators that are equal to
  641. `pos` or come after are invalidated.
  642. @note
  643. The string passed in must not come
  644. from the element being replaced,
  645. or else the behavior is undefined.
  646. @par Example
  647. @code
  648. url u( "?id=42&id=69" );
  649. u.encoded_params().set( u.encoded_params().begin(), "none" );
  650. assert( u.encoded_query() == "id=none&id=69" );
  651. @endcode
  652. @par Complexity
  653. Linear in `this->url().encoded_query().size()`.
  654. @par Exception Safety
  655. Strong guarantee.
  656. Calls to allocate may throw.
  657. Exceptions thrown on invalid input.
  658. @throw system_error
  659. `value` contains an invalid percent-encoding.
  660. @return An iterator to the element.
  661. @param pos An iterator to the element.
  662. @param value The value to assign. The
  663. empty string still counts as a value.
  664. That is, `has_value` for the element
  665. is true.
  666. */
  667. BOOST_URL_DECL
  668. iterator
  669. set(
  670. iterator pos,
  671. pct_string_view value);
  672. /** Set a value
  673. This function performs one of two
  674. actions depending on the value of
  675. `this->contains( key, ic )`.
  676. @li If key is contained in the view
  677. then one of the matching params has
  678. its value changed to the specified value.
  679. The remaining params with a matching
  680. key are erased. Otherwise,
  681. @li If `key` is not contained in the
  682. view, then the function apppends the
  683. param `{ key, value }`.
  684. <br>
  685. All iterators are invalidated.
  686. @note
  687. The strings passed in must not come
  688. from the element being replaced,
  689. or else the behavior is undefined.
  690. @par Example
  691. @code
  692. url u( "?id=42&id=69" );
  693. u.encoded_params().set( "id", "none" );
  694. assert( u.encoded_params().count( "id" ) == 1 );
  695. @endcode
  696. @par Postconditions
  697. @code
  698. this->count( key, ic ) == 1 && this->find( key, ic )->value == value
  699. @endcode
  700. @par Complexity
  701. Linear in `this->url().encoded_query().size()`.
  702. @par Exception Safety
  703. Strong guarantee.
  704. Calls to allocate may throw.
  705. Exceptions thrown on invalid input.
  706. @throw system_error
  707. `key` or `value` contain an invalid
  708. percent-encoding.
  709. @return An iterator to the appended
  710. or modified element.
  711. @param key The key to match.
  712. By default, a case-sensitive
  713. comparison is used.
  714. @param value The value to assign. The
  715. empty string still counts as a value.
  716. That is, `has_value` for the element
  717. is true.
  718. @param ic An optional parameter. If
  719. the value @ref ignore_case is passed
  720. here, the comparison is
  721. case-insensitive.
  722. */
  723. BOOST_URL_DECL
  724. iterator
  725. set(
  726. pct_string_view key,
  727. pct_string_view value,
  728. ignore_case_param ic = {});
  729. private:
  730. BOOST_URL_DECL
  731. detail::params_iter_impl
  732. find_impl(
  733. detail::params_iter_impl,
  734. pct_string_view,
  735. ignore_case_param) const noexcept;
  736. BOOST_URL_DECL
  737. detail::params_iter_impl
  738. find_last_impl(
  739. detail::params_iter_impl,
  740. pct_string_view,
  741. ignore_case_param) const noexcept;
  742. template<class FwdIt>
  743. void
  744. assign(FwdIt first, FwdIt last,
  745. std::forward_iterator_tag);
  746. // Doxygen cannot render ` = delete`
  747. template<class FwdIt>
  748. void
  749. assign(FwdIt first, FwdIt last,
  750. std::input_iterator_tag) = delete;
  751. template<class FwdIt>
  752. iterator
  753. insert(
  754. iterator before,
  755. FwdIt first,
  756. FwdIt last,
  757. std::forward_iterator_tag);
  758. // Doxygen cannot render ` = delete`
  759. template<class FwdIt>
  760. iterator
  761. insert(
  762. iterator before,
  763. FwdIt first,
  764. FwdIt last,
  765. std::input_iterator_tag) = delete;
  766. };
  767. } // urls
  768. } // boost
  769. // This is in <boost/url/url_base.hpp>
  770. //
  771. // #include <boost/url/impl/params_encoded_ref.hpp>
  772. #endif