@@ -203,8 +203,7 @@ class fields_base
203203 @par Exception Safety
204204 Strong guarantee.
205205
206- @param id The field name constant,
207- which may not be @ref field::unknown.
206+ @param id The field name constant.
208207
209208 @param value A value, which must be semantically
210209 valid for the message.
@@ -252,8 +251,7 @@ class fields_base
252251 @par Exception Safety
253252 Strong guarantee.
254253
255- @param id The field name constant,
256- which may not be @ref field::unknown.
254+ @param id The field name constant.
257255
258256 @param value A value, which must be semantically
259257 valid for the message.
@@ -271,10 +269,6 @@ class fields_base
271269 core::string_view value,
272270 system::error_code& ec)
273271 {
274- // Precondition violation
275- if (id == field::unknown)
276- detail::throw_logic_error ();
277-
278272 insert_impl (
279273 id,
280274 to_string (id),
@@ -411,8 +405,7 @@ class fields_base
411405
412406 @param before Position to insert before.
413407
414- @param id The field name constant,
415- which may not be @ref field::unknown.
408+ @param id The field name constant.
416409
417410 @param value A value, which must be semantically
418411 valid for the message.
@@ -468,8 +461,7 @@ class fields_base
468461
469462 @param before Position to insert before.
470463
471- @param id The field name constant,
472- which may not be @ref field::unknown.
464+ @param id The field name constant.
473465
474466 @param value A value, which must be semantically
475467 valid for the message.
@@ -488,10 +480,6 @@ class fields_base
488480 core::string_view value,
489481 system::error_code& ec)
490482 {
491- // Precondition violation
492- if (id == field::unknown)
493- detail::throw_logic_error ();
494-
495483 insert_impl (
496484 id,
497485 to_string (id),
@@ -630,18 +618,15 @@ class fields_base
630618 @par Exception Safety
631619 Throws nothing.
632620
633- @return An iterator to the inserted
634- element.
621+ @return An iterator to one past the
622+ removed element.
635623
636624 @param it An iterator to the element
637625 to erase.
638626 */
627+ BOOST_HTTP_PROTO_DECL
639628 iterator
640- erase (iterator it) noexcept
641- {
642- erase_impl (it.i_ , it->id );
643- return it;
644- }
629+ erase (iterator it) noexcept ;
645630
646631 /* * Erase headers
647632
@@ -661,12 +646,11 @@ class fields_base
661646
662647 @return The number of headers erased.
663648
664- @param id The field name constant,
665- which may not be @ref field::unknown.
649+ @param id The field name constant.
666650 */
667651 BOOST_HTTP_PROTO_DECL
668652 std::size_t
669- erase (field id);
653+ erase (field id) noexcept ;
670654
671655 /* * Erase all matching fields
672656
@@ -823,8 +807,7 @@ class fields_base
823807
824808 @par Complexity
825809
826- @param id The field name constant,
827- which may not be @ref field::unknown.
810+ @param id The field name constant.
828811
829812 @param value A value, which must be semantically
830813 valid for the message.
@@ -924,7 +907,7 @@ class fields_base
924907
925908 void
926909 insert_unchecked_impl (
927- field id,
910+ optional< field> id,
928911 core::string_view name,
929912 core::string_view value,
930913 std::size_t before,
@@ -933,7 +916,7 @@ class fields_base
933916 BOOST_HTTP_PROTO_DECL
934917 void
935918 insert_impl (
936- field id,
919+ optional< field> id,
937920 core::string_view name,
938921 core::string_view value,
939922 std::size_t before,
0 commit comments