params_encoded_ref.hpp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  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 BOOST_URL_DECL 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. @return `*this`
  113. */
  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. @return `*this`
  142. */
  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. @return A view of the params.
  152. */
  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. @return A reference to the url.
  173. */
  174. url_base&
  175. url() const noexcept
  176. {
  177. return *u_;
  178. }
  179. //--------------------------------------------
  180. //
  181. // Modifiers
  182. //
  183. //--------------------------------------------
  184. /** Clear the contents of the container
  185. <br>
  186. All iterators are invalidated.
  187. @par Effects
  188. @code
  189. this->url().remove_query();
  190. @endcode
  191. @par Postconditions
  192. @code
  193. this->empty() == true && this->url().has_query() == false
  194. @endcode
  195. @par Complexity
  196. Constant.
  197. @par Exception Safety
  198. Throws nothing.
  199. */
  200. void
  201. clear() noexcept;
  202. //--------------------------------------------
  203. /** Assign params
  204. This function replaces the entire
  205. contents of the view with the params
  206. in the <em>initializer-list</em>.
  207. <br>
  208. All iterators are invalidated.
  209. @note
  210. The strings referenced by the inputs
  211. must not come from the underlying url,
  212. or else the behavior is undefined.
  213. @par Example
  214. @code
  215. url u;
  216. u.encoded_params().assign({ { "first", "John" }, { "last", "Doe" } });
  217. @endcode
  218. @par Complexity
  219. Linear in `init.size()`.
  220. @par Exception Safety
  221. Strong guarantee.
  222. Calls to allocate may throw.
  223. Exceptions thrown on invalid input.
  224. @throw system_error
  225. `init` contains an invalid percent-encoding.
  226. @param init The list of params to assign.
  227. */
  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 The first element to assign.
  255. @param last One past the last element 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 The first element to append.
  332. @param last One past the last element to append.
  333. @return An iterator to the first new element.
  334. */
  335. template<class FwdIt>
  336. iterator
  337. append(
  338. FwdIt first, FwdIt last);
  339. //--------------------------------------------
  340. /** Insert params
  341. This function inserts a param
  342. before the specified position.
  343. <br>
  344. All iterators that are equal to
  345. `before` or come after are invalidated.
  346. @par Complexity
  347. Linear in `this->url().encoded_query().size()`.
  348. @par Exception Safety
  349. Strong guarantee.
  350. Calls to allocate may throw.
  351. Exceptions thrown on invalid input.
  352. @throw system_error
  353. `p` contains an invalid percent-encoding.
  354. @return An iterator to the inserted
  355. element.
  356. @param before An iterator before which
  357. the param is inserted. This may
  358. be equal to `end()`.
  359. @param p The param to insert.
  360. */
  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. iterator
  393. insert(
  394. iterator before,
  395. std::initializer_list<
  396. param_pct_view> init);
  397. /** Insert params
  398. This function inserts a range of
  399. params before the specified position.
  400. <br>
  401. All iterators that are equal to
  402. `before` or come after are invalidated.
  403. @note
  404. The strings referenced by the inputs
  405. must not come from the underlying url,
  406. or else the behavior is undefined.
  407. @par Mandates
  408. @code
  409. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  410. @endcode
  411. @par Complexity
  412. Linear in `this->url().encoded_query().size()`.
  413. @par Exception Safety
  414. Strong guarantee.
  415. Calls to allocate may throw.
  416. Exceptions thrown on invalid input.
  417. @throw system_error
  418. The range contains an invalid percent-encoding.
  419. @return An iterator to the first
  420. element inserted, or `before` if
  421. `first == last`.
  422. @param before An iterator before which
  423. the element is inserted. This may
  424. be equal to `end()`.
  425. @param first The first element to insert.
  426. @param last One past the last element to insert.
  427. @return An iterator to the first element inserted.
  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 The first element to remove.
  471. @param last One past the last element to remove.
  472. @return An iterator to one past the removed range.
  473. */
  474. iterator
  475. erase(
  476. iterator first,
  477. iterator last) noexcept;
  478. /** Erase params
  479. <br>
  480. All iterators are invalidated.
  481. @par Postconditions
  482. @code
  483. this->count( key, ic ) == 0
  484. @endcode
  485. @par Complexity
  486. Linear in `this->url().encoded_query().size()`.
  487. @par Exception Safety
  488. Exceptions thrown on invalid input.
  489. @throw system_error
  490. `key` contains an invalid percent-encoding.
  491. @return The number of params removed
  492. from the container.
  493. @param key The key to match.
  494. By default, a case-sensitive
  495. comparison is used.
  496. @param ic An optional parameter. If
  497. the value @ref ignore_case is passed
  498. here, the comparison is
  499. case-insensitive.
  500. */
  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. iterator
  536. replace(
  537. iterator pos,
  538. param_pct_view const& p);
  539. /** Replace params
  540. This function replaces a range of
  541. params with the params in an
  542. <em>initializer-list</em>.
  543. <br>
  544. All iterators that are equal to
  545. `from` or come after are invalidated.
  546. @note
  547. The strings referenced by the inputs
  548. must not come from the underlying url,
  549. or else the behavior is undefined.
  550. @par Complexity
  551. Linear in `this->url().encoded_query().size()`.
  552. @par Exception Safety
  553. Strong guarantee.
  554. Calls to allocate may throw.
  555. Exceptions thrown on invalid input.
  556. @throw system_error
  557. `init` contains an invalid percent-encoding.
  558. @return An iterator to the first
  559. element inserted, or one past `to` if
  560. `init.size() == 0`.
  561. @param from,to The range of params
  562. to replace.
  563. @param init The list of params to assign.
  564. */
  565. iterator
  566. replace(
  567. iterator from,
  568. iterator to,
  569. std::initializer_list<
  570. param_pct_view> init);
  571. /** Replace params
  572. This function replaces a range of
  573. params with a range of params.
  574. <br>
  575. All iterators that are equal to
  576. `from` or come after are invalidated.
  577. @note
  578. The strings referenced by the inputs
  579. must not come from the underlying url,
  580. or else the behavior is undefined.
  581. @par Mandates
  582. @code
  583. std::is_convertible< std::iterator_traits< FwdIt >::reference_type, param_pct_view >::value == true
  584. @endcode
  585. @par Complexity
  586. Linear in `this->url().encoded_query().size()`.
  587. @par Exception Safety
  588. Strong guarantee.
  589. Calls to allocate may throw.
  590. Exceptions thrown on invalid input.
  591. @throw system_error
  592. The range contains an invalid percent-encoding.
  593. @return An iterator to the first
  594. element inserted, or one past `to` if
  595. `first == last`.
  596. @param from The first element to replace.
  597. @param to One past the last element to replace.
  598. @param first The first element to insert.
  599. @param last One past the last element to insert.
  600. @return An iterator to the first element inserted, or
  601. one past `to` if `first == last`.
  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. iterator
  633. unset(
  634. iterator pos) noexcept;
  635. /** Set a value
  636. This function replaces the value of an
  637. element at the specified position.
  638. <br>
  639. All iterators that are equal to
  640. `pos` or come after are invalidated.
  641. @note
  642. The string passed in must not come
  643. from the element being replaced,
  644. or else the behavior is undefined.
  645. @par Example
  646. @code
  647. url u( "?id=42&id=69" );
  648. u.encoded_params().set( u.encoded_params().begin(), "none" );
  649. assert( u.encoded_query() == "id=none&id=69" );
  650. @endcode
  651. @par Complexity
  652. Linear in `this->url().encoded_query().size()`.
  653. @par Exception Safety
  654. Strong guarantee.
  655. Calls to allocate may throw.
  656. Exceptions thrown on invalid input.
  657. @throw system_error
  658. `value` contains an invalid percent-encoding.
  659. @return An iterator to the element.
  660. @param pos An iterator to the element.
  661. @param value The value to assign. The
  662. empty string still counts as a value.
  663. That is, `has_value` for the element
  664. is true.
  665. */
  666. iterator
  667. set(
  668. iterator pos,
  669. pct_string_view value);
  670. /** Set a value
  671. This function performs one of two
  672. actions depending on the value of
  673. `this->contains( key, ic )`.
  674. @li If key is contained in the view
  675. then one of the matching params has
  676. its value changed to the specified value.
  677. The remaining params with a matching
  678. key are erased. Otherwise,
  679. @li If `key` is not contained in the
  680. view, then the function apppends the
  681. param `{ key, value }`.
  682. <br>
  683. All iterators are invalidated.
  684. @note
  685. The strings passed in must not come
  686. from the element being replaced,
  687. or else the behavior is undefined.
  688. @par Example
  689. @code
  690. url u( "?id=42&id=69" );
  691. u.encoded_params().set( "id", "none" );
  692. assert( u.encoded_params().count( "id" ) == 1 );
  693. @endcode
  694. @par Postconditions
  695. @code
  696. this->count( key, ic ) == 1 && this->find( key, ic )->value == value
  697. @endcode
  698. @par Complexity
  699. Linear in `this->url().encoded_query().size()`.
  700. @par Exception Safety
  701. Strong guarantee.
  702. Calls to allocate may throw.
  703. Exceptions thrown on invalid input.
  704. @throw system_error
  705. `key` or `value` contain an invalid
  706. percent-encoding.
  707. @return An iterator to the appended
  708. or modified element.
  709. @param key The key to match.
  710. By default, a case-sensitive
  711. comparison is used.
  712. @param value The value to assign. The
  713. empty string still counts as a value.
  714. That is, `has_value` for the element
  715. is true.
  716. @param ic An optional parameter. If
  717. the value @ref ignore_case is passed
  718. here, the comparison is
  719. case-insensitive.
  720. */
  721. iterator
  722. set(
  723. pct_string_view key,
  724. pct_string_view value,
  725. ignore_case_param ic = {});
  726. private:
  727. template<class FwdIt>
  728. void
  729. assign(FwdIt first, FwdIt last,
  730. std::forward_iterator_tag);
  731. // Doxygen cannot render ` = delete`
  732. template<class FwdIt>
  733. void
  734. assign(FwdIt first, FwdIt last,
  735. std::input_iterator_tag) = delete;
  736. template<class FwdIt>
  737. iterator
  738. insert(
  739. iterator before,
  740. FwdIt first,
  741. FwdIt last,
  742. std::forward_iterator_tag);
  743. // Doxygen cannot render ` = delete`
  744. template<class FwdIt>
  745. iterator
  746. insert(
  747. iterator before,
  748. FwdIt first,
  749. FwdIt last,
  750. std::input_iterator_tag) = delete;
  751. };
  752. } // urls
  753. } // boost
  754. // This is in <boost/url/url_base.hpp>
  755. //
  756. // #include <boost/url/impl/params_encoded_ref.hpp>
  757. #endif