From 3b32f3a87dc62c8ddea6dd2e8827da4f7956ed32 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Mon, 30 Mar 2026 23:09:44 +0200 Subject: [PATCH] P4022R0 Remove try_append_range from inplace_vector for now Fixes NB PL 006 (C++26 CD). Editorial note: The paper erroneously requests changing the feature test macro __cpp_lib_constexpr_inplace_vector, when in fact the macro that is affected is __cpp_lib_inplace_vector. However, that latter macro was already changed by paper P3981R2 from LWG Motion 19, and even though this paper removes part of the affected features from inplace_vector, other parts that were also affected by P3981R2 remain, and thus that paper's change of the macro remains justified. Therefore, this change does not modify any feature test macros at all. --- source/containers.tex | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 0a872eec20..e8f86c09c9 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -10992,8 +10992,6 @@ constexpr optional try_emplace_back(Args&&... args); constexpr optional try_push_back(const T& x); constexpr optional try_push_back(T&& x); - template<@\exposconcept{container-compatible-range}@ R> - constexpr ranges::borrowed_iterator_t try_append_range(R&& rg); template constexpr reference unchecked_emplace_back(Args&&... args); @@ -11347,45 +11345,6 @@ If an exception is thrown, there are no effects on \tcode{*this}. \end{itemdescr} -\indexlibrarymember{try_append_range}{inplace_vector}% -\begin{itemdecl} -template<@\exposconcept{container-compatible-range}@ R> - constexpr ranges::borrowed_iterator_t try_append_range(R&& rg); -\end{itemdecl} - -\begin{itemdescr} -\pnum -\expects -\tcode{value_type} is \oldconcept{EmplaceConstructible} -into \tcode{inplace_vector} from\\\tcode{*ranges::begin(rg)}. - -\pnum -\effects -Appends copies of initial elements in \tcode{rg} before \tcode{end()}, -until all elements are inserted or \tcode{size() == capacity()} is \tcode{true}. -Each iterator in the range \tcode{rg} is dereferenced at most once. - -\pnum -\returns -The first iterator in the range -\countedrange{ranges::begin(rg)}{n} -that was not inserted into \tcode{*this}, -where \tcode{n} is the number of elements in \tcode{rg}. - -\pnum -\complexity -Linear in the number of elements inserted. - -\pnum -\remarks -Let $n$ be the value of \tcode{size()} prior to this call. -If an exception is thrown after the insertion of $k$ elements, then -\tcode{size()} equals $n + k$, -elements in the range \tcode{begin() + \range{0}{$n$}} are not modified, and -elements in the range \tcode{begin() + \range{$n$}{$n + k$}} correspond to -the inserted elements. -\end{itemdescr} - \indexlibrarymember{unchecked_emplace_back}{inplace_vector}% \begin{itemdecl} template