[{"id":3672679,"web_url":"http://patchwork.ozlabs.org/comment/3672679/","msgid":"<CACb0b4=2HRdZwUOKGUBSx55BrbT-DUb+yDMHW9GhPEo9VyqpBg@mail.gmail.com>","list_archive_url":null,"date":"2026-04-02T11:38:42","subject":"Re: [PATCH] libstdc++: Updated inplace_vector::try_ functions per\n P3981R2 and P4022R0.","submitter":{"id":48004,"url":"http://patchwork.ozlabs.org/api/people/48004/","name":"Jonathan Wakely","email":"jwakely@redhat.com"},"content":"On Thu, 2 Apr 2026 at 11:43, Tomasz Kamiński <tkaminsk@redhat.com> wrote:\n>\n> This paper removes the try_append_range from inplace_vector and changes the\n> return type of try_emplace_back and try_push_back to optional<_Tp&> per:\n> P4022R0: Remove try_append_range from inplace_vector for now.\n> P3981R2: Better return types in std::inplace_vector and std::exception_ptr_cast.\n>\n> The test are also expanded to cover type Y, that is convertible to optional<Y&>,\n> and require return type to be constructed using in_place.\n>\n> libstdc++-v3/ChangeLog:\n>\n>         * include/bits/version.def (inplace_vector): Bump to 202603.\n>         * include/bits/version.h: Regenerate.\n>         * include/std/inplace_vector (inplace_vector::try_emplace_back)\n>         (inplace_vector::try_push_back): Change return type to optional<_Tp&>\n>         and adjust implementation accordingly.\n>         (inplace_vector::try_append_range): Remove.\n>         * include/debug/inplace_vector (inplace_vector::try_emplace_back)\n>         (inplace_vector::try_push_back, inplace_vector::try_append_range):\n>         Likewise.\n>         * testsuite/23_containers/inplace_vector/modifiers/single_insert.cc:\n>         Updated check for the optional<T&> return. Added test for type\n>         convertible to optional<T&>\n>         * testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc:\n>         Use has_value() to check if engaged optional is returned.\n>         * testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc:\n>         Likewise.\n>         * testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc:\n>         Remove try_append_range tests.\n>         * testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc:\n>         Removed.\n>         * testsuite/23_containers/inplace_vector/version.cc: Updated expected\n>         feature test macro value.\n> ---\n> The exception_ptr change need to be handled seprately, due it being\n> defined in libsup++.\n>\n> Testing on x86_64-linux. All *inplace_vector* test already passed.\n> OK for trunk if all test finishes?\n>\n>  libstdc++-v3/include/bits/version.def         |  5 +-\n>  libstdc++-v3/include/bits/version.h           |  4 +-\n>  libstdc++-v3/include/debug/inplace_vector     | 26 ++-----\n>  libstdc++-v3/include/std/inplace_vector       | 70 +++++--------------\n>  .../debug/invalidation/try_append_range.cc    | 45 ------------\n>  .../debug/invalidation/try_emplace_back.cc    |  2 +-\n>  .../debug/invalidation/try_push_back.cc       |  4 +-\n>  .../inplace_vector/modifiers/multi_insert.cc  | 46 ------------\n>  .../inplace_vector/modifiers/single_insert.cc | 41 ++++++++---\n>  .../23_containers/inplace_vector/version.cc   |  4 +-\n>  10 files changed, 66 insertions(+), 181 deletions(-)\n>  delete mode 100644 libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n>\n> diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def\n> index ada8da88bc5..998223306e2 100644\n> --- a/libstdc++-v3/include/bits/version.def\n> +++ b/libstdc++-v3/include/bits/version.def\n> @@ -2223,9 +2223,12 @@ ftms = {\n>  };\n>\n>  ftms = {\n> +  // 202406 P0843R14 inplace_vector\n> +  // 202603 P3981R2 Better return types in std::inplace_vector and std::exception_ptr_cast\n> +  //        P4022R0 Remove try_append_range from inplace_vector for now\n>    name = inplace_vector;\n>    values = {\n> -    v = 202406;\n> +    v = 202603;\n>      cxxmin = 26;\n>    };\n>  };\n> diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h\n> index 0490e79dd41..cb3b9b0997e 100644\n> --- a/libstdc++-v3/include/bits/version.h\n> +++ b/libstdc++-v3/include/bits/version.h\n> @@ -2488,9 +2488,9 @@\n>\n>  #if !defined(__cpp_lib_inplace_vector)\n>  # if (__cplusplus >  202302L)\n> -#  define __glibcxx_inplace_vector 202406L\n> +#  define __glibcxx_inplace_vector 202603L\n>  #  if defined(__glibcxx_want_all) || defined(__glibcxx_want_inplace_vector)\n> -#   define __cpp_lib_inplace_vector 202406L\n> +#   define __cpp_lib_inplace_vector 202603L\n>  #  endif\n>  # endif\n>  #endif /* !defined(__cpp_lib_inplace_vector) */\n> diff --git a/libstdc++-v3/include/debug/inplace_vector b/libstdc++-v3/include/debug/inplace_vector\n> index 750b0a7343c..e579e8636f9 100644\n> --- a/libstdc++-v3/include/debug/inplace_vector\n> +++ b/libstdc++-v3/include/debug/inplace_vector\n> @@ -338,11 +338,12 @@ namespace __debug\n>        }\n>\n>        template<typename... _Args>\n> -       constexpr _Tp*\n> +       constexpr optional<_Tp&>\n>         try_emplace_back(_Args&&... __args)\n>         {\n>           auto __end = _Base::cend();\n> -         _Tp* __res = _Base::try_emplace_back(std::forward<_Args>(__args)...);\n> +         optional<_Tp&> __res\n> +           = _Base::try_emplace_back(std::forward<_Args>(__args)...);\n\nIs it valuable to state the type explicitly, rather than just using auto?\n\nI don't have a preference, so OK for trunk either way.\n\n>\n>           if (__res)\n>             this->_M_invalidate_if(_Equal(__end));\n> @@ -350,11 +351,11 @@ namespace __debug\n>           return __res;\n>         }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(const _Tp& __x)\n>        {\n>         const auto __end = _Base::cend();\n> -       _Tp* __res = _Base::try_push_back(__x);\n> +       optional<_Tp&> __res = _Base::try_push_back(__x);\n>\n>         if (__res)\n>           this->_M_invalidate_if(_Equal(__end));\n> @@ -362,11 +363,11 @@ namespace __debug\n>         return __res;\n>        }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(_Tp&& __x)\n>        {\n>         const auto __end = _Base::cend();\n> -       _Tp* __res = _Base::try_push_back(std::move(__x));\n> +       optional<_Tp&> __res = _Base::try_push_back(std::move(__x));\n>\n>         if (__res)\n>           this->_M_invalidate_if(_Equal(__end));\n> @@ -374,19 +375,6 @@ namespace __debug\n>         return __res;\n>        }\n>\n> -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> -       constexpr ranges::borrowed_iterator_t<_Rg>\n> -       try_append_range(_Rg&& __rg)\n> -       {\n> -         const auto __size = size();\n> -         const auto __end = _Base::cend();\n> -         auto __res = _Base::try_append_range(__rg);\n> -         if (size() != __size)\n> -           this->_M_invalidate_if(_Equal(__end));\n> -\n> -         return __res;\n> -       }\n> -\n>        template<typename... _Args>\n>         constexpr _Tp&\n>         unchecked_emplace_back(_Args&&... __args)\n> diff --git a/libstdc++-v3/include/std/inplace_vector b/libstdc++-v3/include/std/inplace_vector\n> index c22a9e1f9b4..5ad92332a02 100644\n> --- a/libstdc++-v3/include/std/inplace_vector\n> +++ b/libstdc++-v3/include/std/inplace_vector\n> @@ -38,6 +38,7 @@\n>  #ifdef __glibcxx_inplace_vector // C++ >= 26\n>  #include <compare>\n>  #include <initializer_list>\n> +#include <optional>\n>  #include <bits/stdexcept_throw.h>\n>  #include <bits/range_access.h>\n>  #include <bits/ranges_base.h> // borrowed_iterator_t, __detail::__container_compatible_range\n> @@ -550,63 +551,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n>        }\n>\n>        template<typename... _Args>\n> -       constexpr _Tp*\n> +       constexpr optional<_Tp&>\n>         try_emplace_back(_Args&&... __args)\n>         {\n>           if (_M_size >= _Nm) [[unlikely]]\n> -           return nullptr;\n> -         auto& __r = unchecked_emplace_back(std::forward<_Args>(__args)...);\n> -         return __builtin_addressof(__r);\n> +           return nullopt;\n> +         return optional<_Tp&>(in_place,\n> +                  unchecked_emplace_back(std::forward<_Args>(__args)...));\n>         }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(const _Tp& __x)\n>        {\n>         if (_M_size >= _Nm) [[unlikely]]\n> -         return nullptr;\n> -       return __builtin_addressof(unchecked_emplace_back(__x));\n> +         return nullopt;\n> +       return optional<_Tp&>(in_place, unchecked_emplace_back(__x));\n>        }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(_Tp&& __x)\n>        {\n>         if (_M_size >= _Nm) [[unlikely]]\n> -         return nullptr;\n> -       return __builtin_addressof(unchecked_emplace_back(std::move(__x)));\n> +         return nullopt;\n> +       return optional<_Tp&>(in_place, unchecked_emplace_back(std::move(__x)));\n>        }\n>\n> -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> -       constexpr ranges::borrowed_iterator_t<_Rg>\n> -       try_append_range(_Rg&& __rg)\n> -       {\n> -         if constexpr (ranges::sized_range<_Rg>)\n> -           {\n> -             auto __n = ranges::distance(__rg);\n> -             if (__n == 0) [[unlikely]]\n> -               return ranges::begin(__rg);\n> -\n> -             const auto __end = data() + _M_size;\n> -             const size_t __avail = _Nm - size();\n> -             if (__n <= __avail)\n> -               _M_size += size_type(__n);\n> -             else\n> -               {\n> -                 __n = __avail;\n> -                 _M_size = _Nm;\n> -               }\n> -             return ranges::uninitialized_copy_n(\n> -                      ranges::begin(__rg), __n,\n> -                      __end, unreachable_sentinel).in;\n> -           }\n> -         else\n> -           {\n> -             ranges::subrange<pointer> __tail(data() + _M_size, data() + _Nm);\n> -             auto [__in, __out] = ranges::uninitialized_copy(__rg, __tail);\n> -             _M_size = __out - data();\n> -             return std::move(__in);\n> -           }\n> -       }\n> -\n>        template<typename... _Args>\n>         constexpr _Tp&\n>         unchecked_emplace_back(_Args&&... __args)\n> @@ -1208,22 +1177,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n>        { __builtin_trap(); }\n>\n>        template<typename... _Args>\n> -       constexpr _Tp*\n> +        constexpr optional<_Tp&>\n>         try_emplace_back(_Args&&...)\n> -       { return nullptr; }\n> +       { return nullopt; }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(const _Tp&)\n> -      { return nullptr; }\n> +      { return nullopt; }\n>\n> -      constexpr _Tp*\n> +      constexpr optional<_Tp&>\n>        try_push_back(_Tp&&)\n> -      { return nullptr; }\n> -\n> -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> -       constexpr ranges::borrowed_iterator_t<_Rg>\n> -       try_append_range(_Rg&& __rg)\n> -       { return ranges::begin(__rg); }\n> +      { return nullopt; }\n>\n>        template<typename... _Args>\n>         [[noreturn]]\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> deleted file mode 100644\n> index ae4ac418f50..00000000000\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> +++ /dev/null\n> @@ -1,45 +0,0 @@\n> -// { dg-do run { target c++26 } }\n> -\n> -#include <debug/inplace_vector>\n> -#include <testsuite_hooks.h>\n> -\n> -using __gnu_debug::inplace_vector;\n> -\n> -void test01()\n> -{\n> -  inplace_vector<int, 100> v(10, 17);\n> -  inplace_vector<int, 10> v1(10, 19);\n> -\n> -  auto before = v.begin() + 6;\n> -  auto last = v.end();\n> -  auto end = last--;\n> -\n> -  v.try_append_range(v1);\n> -\n> -  VERIFY(before._M_dereferenceable());\n> -  VERIFY(last._M_dereferenceable());\n> -  VERIFY(end._M_singular());\n> -}\n> -\n> -void test02()\n> -{\n> -  inplace_vector<int, 100> v(10, 17);\n> -  inplace_vector<int, 0> v1;\n> -\n> -  auto before = v.begin() + 6;\n> -  auto last = v.end();\n> -  auto end = last--;\n> -\n> -  v.try_append_range(v1);\n> -\n> -  VERIFY(before._M_dereferenceable());\n> -  VERIFY(last._M_dereferenceable());\n> -  VERIFY(!end._M_singular());\n> -}\n> -\n> -int main()\n> -{\n> -  test01();\n> -  test02();\n> -  return 0;\n> -}\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> index f7c8c7a9ba2..606d478a0dc 100644\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> @@ -13,7 +13,7 @@ void test01()\n>    auto last = v.end();\n>    auto end = last--;\n>\n> -  VERIFY( v.try_emplace_back(42) != nullptr );\n> +  VERIFY( v.try_emplace_back(42).has_value() );\n>\n>    VERIFY(before._M_dereferenceable());\n>    VERIFY(last._M_dereferenceable());\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> index 04fc010e500..96af2b65b72 100644\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> @@ -14,7 +14,7 @@ void test01()\n>    auto last = v.end();\n>    auto end = last--;\n>\n> -  VERIFY( v.try_push_back(42) != nullptr );\n> +  VERIFY( v.try_push_back(42).has_value() );\n>\n>    VERIFY(before._M_dereferenceable());\n>    VERIFY(last._M_dereferenceable());\n> @@ -30,7 +30,7 @@ void test02()\n>    auto last = v.end();\n>    auto end = last--;\n>\n> -  VERIFY( v.try_push_back(std::move(vv)) != nullptr );\n> +  VERIFY( v.try_push_back(std::move(vv)).has_value() );\n>\n>    VERIFY(before._M_dereferenceable());\n>    VERIFY(last._M_dereferenceable());\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> index 454163892ad..e5a482cdc65 100644\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> @@ -54,16 +54,6 @@ test_add_to_full_it()\n>\n>    std::inplace_vector<T, N> v(std::from_range, std::span(a, a+N));\n>\n> -  Range r1(a, a);\n> -  auto rit1 = v.try_append_range(r1);\n> -  VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( rit1.base() == a );\n> -\n> -  SizedRange r2(a, a);\n> -  auto rit2 = v.try_append_range(r2);\n> -  VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( rit2.base() == a );\n> -\n>    v.append_range(Range(a, a));\n>    VERIFY( eq<T>(v, {a, N}) );\n>    v.append_range(SizedRange(a, a));\n> @@ -93,17 +83,6 @@ test_add_to_full_it()\n>    VERIFY( eq<T>(v, {a, N}) );\n>    VERIFY( it == v.begin() );\n>\n> -  // Inserting non-empty range\n> -  Range r3(a+3, a+5);\n> -  auto rit3 = v.try_append_range(r3);\n> -  VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( rit3.base() == a+3 );\n> -\n> -  SizedRange r4(a+2, a+5);\n> -  auto rit4 = v.try_append_range(r4);\n> -  VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( rit4.base() == a+2 );\n> -\n>  #ifdef __cpp_exceptions\n>  #ifndef __cpp_lib_constexpr_exceptions\n>    if consteval {\n> @@ -265,30 +244,6 @@ test_append_range()\n>  #endif\n>  }\n>\n> -template<typename Range>\n> -constexpr void\n> -test_try_append_range()\n> -{\n> -  using T = std::ranges::range_value_t<Range>;\n> -  T a[]{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25};\n> -\n> -  std::inplace_vector<T, 20> v;\n> -  Range r1 = Range(a, a+10);\n> -  auto it1 = v.try_append_range(r1);\n> -  VERIFY( eq<T>(v, {a, 10}) );\n> -  VERIFY( it1.base() == a+10 );\n> -\n> -  Range r2 = Range(a+10, a+15);\n> -  auto it2 = v.try_append_range(r2);\n> -  VERIFY( eq<T>(v, {a, 15}) );\n> -  VERIFY( it2.base() == a+15 );\n> -\n> -  Range r3 = Range(a+15, a+25);\n> -  auto it3 = v.try_append_range(r3);\n> -  VERIFY( eq<T>(v, {a, 20}) );\n> -  VERIFY( it3.base() == a+20 );\n> -}\n> -\n>  template<typename Range>\n>  constexpr void\n>  test_insert_range()\n> @@ -357,7 +312,6 @@ constexpr void\n>  do_test_ranges()\n>  {\n>    test_append_range<Range>();\n> -  test_try_append_range<Range>();\n>    test_insert_range<Range>();\n>  }\n>\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> index 92bd765982e..245af928800 100644\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> @@ -3,6 +3,7 @@\n>  #include <inplace_vector>\n>\n>  #include <span>\n> +#include <optional>\n>  #include <testsuite_hooks.h>\n>\n>  struct X\n> @@ -18,6 +19,20 @@ struct X\n>    friend auto operator<=>(const X&, const X&) = default;\n>  };\n>\n> +// Type that is convertible to optional<Y&>\n> +struct Y\n> +{\n> +  Y() = default;\n> +  constexpr Y(int p) : v(p) {}\n> +\n> +  constexpr operator std::optional<Y&>()\n> +  { return std::nullopt; }\n> +\n> +  int v;\n> +\n> +  friend auto operator<=>(const Y&, const Y&) = default;\n> +};\n> +\n>  template<typename T, typename V, size_t N>\n>  constexpr bool\n>  eq(const std::inplace_vector<V, N>& l, std::span<const T> r) {\n> @@ -40,11 +55,11 @@ test_add_to_full()\n>\n>    std::inplace_vector<T, N> v(std::from_range, std::span(a, a+N));\n>\n> -  VERIFY( v.try_emplace_back(1) == nullptr );\n> +  VERIFY( !v.try_emplace_back(1).has_value() );\n>    VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( v.try_push_back(T(1)) == nullptr );\n> +  VERIFY( !v.try_push_back(T(1)).has_value() );\n>    VERIFY( eq<T>(v, {a, N}) );\n> -  VERIFY( v.try_push_back(c) == nullptr );\n> +  VERIFY( !v.try_push_back(c).has_value() );\n>    VERIFY( eq<T>(v, {a, N}) );\n>\n>  #ifdef __cpp_exceptions\n> @@ -149,15 +164,18 @@ test_inserts()\n>    v.unchecked_push_back(c);\n>    VERIFY( eq<T>(v, {a+3, 6}) );\n>\n> -  T* ptr = v.try_emplace_back(7);\n> +  std::optional<T&> opt = v.try_emplace_back(7);\n>    VERIFY( eq<T>(v, {a+3, 7}) );\n> -  VERIFY( ptr = &v.back() );\n> -  ptr = v.try_push_back(T(8));\n> +  VERIFY( opt.has_value() );\n> +  VERIFY( &*opt == &v.back() );\n> +  opt = v.try_push_back(T(8));\n>    VERIFY( eq<T>(v, {a+3, 8}) );\n> -  VERIFY( ptr = &v.back() );\n> -  ptr = v.try_push_back(c);\n> +  VERIFY( opt.has_value() );\n> +  VERIFY( &*opt == &v.back() );\n> +  opt = v.try_push_back(c);\n>    VERIFY( eq<T>(v, {a+3, 9}) );\n> -  VERIFY( ptr = &v.back() );\n> +  VERIFY( opt.has_value() );\n> +  VERIFY( &*opt == &v.back() );\n>\n>    auto it = v.emplace(v.end(), 10);\n>    VERIFY( eq<T>(v, {a+3, 10}) );\n> @@ -195,12 +213,15 @@ int main()\n>    auto test_all = [] {\n>      test_add_to_full<0, int>();\n>      test_add_to_full<0, X>();\n> +    test_add_to_full<0, Y>();\n>\n>      test_add_to_full<4, int>();\n> +    test_add_to_full<4, Y>();\n>\n>      test_inserts<int>();\n> +    test_inserts<Y>();\n>  #ifdef __cpp_lib_constexpr_inplace_vector\n> -#error uncomemnt test_inserts<X>()\n> +#error enable tests bellow\n>  #endif\n>      if ! consteval {\n>        test_add_to_full<4, X>();\n> diff --git a/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc b/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> index a5bbdb8464b..493e86dc6dd 100644\n> --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> @@ -5,7 +5,7 @@\n>\n>  #ifndef __cpp_lib_inplace_vector\n>  # error \"Feature-test macro for inplace_vector missing in <inplace_vector>\"\n> -#elif __cpp_lib_inplace_vector != 202406L\n> +#elif __cpp_lib_inplace_vector != 202603L\n>  # error \"Feature-test macro for inplace_vector has wrong value in <inplace_vector>\"\n>  #endif\n>\n> @@ -15,6 +15,6 @@\n>\n>  #ifndef __cpp_lib_inplace_vector\n>  # error \"Feature-test macro for inplace_vector missing in <version>\"\n> -#elif __cpp_lib_inplace_vector != 202406L\n> +#elif __cpp_lib_inplace_vector != 202603L\n>  # error \"Feature-test macro for inplace_vector has wrong value in <version>\"\n>  #endif\n> --\n> 2.53.0\n>","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fXhlrjbF;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=fXhlrjbF","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmfyw0gNbz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 22:39:36 +1100 (AEDT)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D29E74BA23CF\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 11:39:33 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 864D54BA2E2E\n for <gcc-patches@gcc.gnu.org>; Thu,  2 Apr 2026 11:39:01 +0000 (GMT)","from mail-yw1-f200.google.com (mail-yw1-f200.google.com\n [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-500-bb7YHhv1Na-kUQ3RBQ0EqQ-1; Thu, 02 Apr 2026 07:38:59 -0400","by mail-yw1-f200.google.com with SMTP id\n 00721157ae682-794c39ea759so14066727b3.1\n for <gcc-patches@gcc.gnu.org>; Thu, 02 Apr 2026 04:38:59 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D29E74BA23CF","OpenDKIM Filter v2.11.0 sourceware.org 864D54BA2E2E"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 864D54BA2E2E","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 864D54BA2E2E","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775129941; cv=none;\n b=UKcodtRqjWd64mwV8JtTv745hTg+DO0nPSkiQTUaSsV64VuhP2NKJbSOd61E6liwJuZGTj0AOCTGoSIlhlCL0BnBKbQQoGAPg44Hu/ctFEWhNiGzJk1c7L9hRGnp/0OklkmP6lhj4PEG+08dUhg7k0tGLg1UgubAtWOyHF84lgQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775129941; c=relaxed/simple;\n bh=WRJwoPkV6TWSDHxMeX5K9yXzXd8cN5r2M9E8IxSFqaA=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=p4cri0U0DBnqUOSdGcE8kGc8XFJCEALj8LgY6jku/RE+Rz/iMRHo8iZWWas7X4XbeKt9bYD2qQKTKiFPJfXuoOgpXAaNFsgfI0UE5ba5ZmLB5R9Pa2kAWdcZyxpSqiNmaWYzZRX+5ugCSaUjVnEHRtsBNEUiCfPV9C3XFm9F9+E=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775129941;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=KS0Ql8ZNXVe/Tlz6LKHAghjQrPkVuph+DT9QK9wBkvE=;\n b=fXhlrjbFIWjEB5bqSeEJczyD6i2GRGg+4VHYUB3LsdjvckuANdwZxEa2IMNCrNN5RQKRN3\n 4F4Z/A32Q0VBECYjCgZ57z7Br33nMGck1bt4ZDD2LtaPlc3kqsgKoxm+NuwbCdf13qRX+M\n 3oOc7RWr+p+b44Dmz5gle1J3s9rCei8=","X-MC-Unique":"bb7YHhv1Na-kUQ3RBQ0EqQ-1","X-Mimecast-MFC-AGG-ID":"bb7YHhv1Na-kUQ3RBQ0EqQ_1775129939","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775129939; x=1775734739;\n h=content-transfer-encoding:cc:to:subject:message-id:date:from\n :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=KS0Ql8ZNXVe/Tlz6LKHAghjQrPkVuph+DT9QK9wBkvE=;\n b=L5nl6mMBFUEOImlOhPN+Wkq3YTYsnCPG6eaZ5a+ztWdOPYkuuJh6ULLl3b7FjpP0WF\n 0oGiWxOs1b+H6h4EVStypbsn9yDK/Ecy39u6ZIZOzlK9s6MwNTpcNQ9nnBikKfcxeNFs\n K8Vd1VrKXbZ4itEVxtQQudlTcAx8MSNNi+qdpx+5pD94kRFFGRcvmXAumTSL0naoVYSI\n gCYa6mXuXWcJGFwftxcz1O/KyaNCIRKIhJKA2qycSEN+/whSGfaIoM6OXx+n9Os52Q1B\n wslbDOXKQ+69qmnPEejGeA2HmQDRcnASRDhLNPmbOM0cPrzAa0uHhlWdKzo1sz6tr+MW\n xxWw==","X-Forwarded-Encrypted":"i=1;\n AJvYcCUKdhzy/PWh3HsIDqZy4xGuxd/vSlHE0EIi+lr+3f7wOAewYWNEazOYteCRcoIaFPiOqef5JJt4yF4nFg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YwvLJ7qYK84IQ5vKB6Z23CYoiycGtARi/THEMOQ8dHfyAuZ+MQZ\n LX5o4UHePdCpAbpXy8uA+NbGxsgqsLVRNfny1gJJ1np2zIqek/LioE/ybL6lqD7F83uWzwRqlSy\n dul0X23gvp/so0h9hhL0lGSI8aRVuDm21SHOHjm0Oj6qojxgMKzEOwnIJrz7IlazmvtKDJI8yIO\n KjJkFumo/SArKgH2AiKs3kgYr0qrb8kIeweA==","X-Gm-Gg":"AeBDietP1FfIExExeCoK0jhWj07xQUBPOL9+ZUk5Ubmg4IQbkRfNpMLDdTjzGGXd1iv\n AiBXA4Ab76eTGECtgfagETwcah0S58FSPlNP6qGZbJ0apUzwz7e86bhvawE2wyUpyiVsaO/kI23\n 5XMc17qGQEvkKnWxTSy9DCCyPDeXFFq7jegh+6+DMDQH2UTI+r7Q3EXTKPOjhwLa1AevwKYd0j8\n UdUNsrGf6+/Va+eouFge6jl+JUYx4GmAcK8yXF+peuRuJMBxskemWmrYBglxuwdJDk=","X-Received":["by 2002:a05:690e:d41:b0:650:3431:24c7 with SMTP id\n 956f58d0204a3-650343127b3mr4908801d50.34.1775129939038;\n Thu, 02 Apr 2026 04:38:59 -0700 (PDT)","by 2002:a05:690e:d41:b0:650:3431:24c7 with SMTP id\n 956f58d0204a3-650343127b3mr4908780d50.34.1775129938490; Thu, 02 Apr 2026\n 04:38:58 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20260402104238.340807-1-tkaminsk@redhat.com>","In-Reply-To":"<20260402104238.340807-1-tkaminsk@redhat.com>","From":"Jonathan Wakely <jwakely@redhat.com>","Date":"Thu, 2 Apr 2026 12:38:42 +0100","X-Gm-Features":"AQROBzBcD2KSjfF26TRbGLFLRdZiUl51dUM6eo_no0R7CPcfiKsoX2dvCHxkPAE","Message-ID":"\n <CACb0b4=2HRdZwUOKGUBSx55BrbT-DUb+yDMHW9GhPEo9VyqpBg@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Updated inplace_vector::try_ functions per\n P3981R2 and P4022R0.","To":"=?utf-8?q?Tomasz_Kami=C5=84ski?= <tkaminsk@redhat.com>","Cc":"libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"OFL8Xn6dGIlQzTeXskh9slMzeO9U48T3w2jmoNajm0Y_1775129939","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}},{"id":3672687,"web_url":"http://patchwork.ozlabs.org/comment/3672687/","msgid":"<CAKvuMXBhoTr93UTmkxJPtDPi-A9hfsge3eNEgf+LU0rV7DUNow@mail.gmail.com>","list_archive_url":null,"date":"2026-04-02T11:55:14","subject":"Re: [PATCH] libstdc++: Updated inplace_vector::try_ functions per\n P3981R2 and P4022R0.","submitter":{"id":90409,"url":"http://patchwork.ozlabs.org/api/people/90409/","name":"Tomasz Kaminski","email":"tkaminsk@redhat.com"},"content":"On Thu, Apr 2, 2026 at 1:39 PM Jonathan Wakely <jwakely@redhat.com> wrote:\n\n> On Thu, 2 Apr 2026 at 11:43, Tomasz Kamiński <tkaminsk@redhat.com> wrote:\n> >\n> > This paper removes the try_append_range from inplace_vector and changes\n> the\n> > return type of try_emplace_back and try_push_back to optional<_Tp&> per:\n> > P4022R0: Remove try_append_range from inplace_vector for now.\n> > P3981R2: Better return types in std::inplace_vector and\n> std::exception_ptr_cast.\n> >\n> > The test are also expanded to cover type Y, that is convertible to\n> optional<Y&>,\n> > and require return type to be constructed using in_place.\n> >\n> > libstdc++-v3/ChangeLog:\n> >\n> >         * include/bits/version.def (inplace_vector): Bump to 202603.\n> >         * include/bits/version.h: Regenerate.\n> >         * include/std/inplace_vector (inplace_vector::try_emplace_back)\n> >         (inplace_vector::try_push_back): Change return type to\n> optional<_Tp&>\n> >         and adjust implementation accordingly.\n> >         (inplace_vector::try_append_range): Remove.\n> >         * include/debug/inplace_vector (inplace_vector::try_emplace_back)\n> >         (inplace_vector::try_push_back,\n> inplace_vector::try_append_range):\n> >         Likewise.\n> >         *\n> testsuite/23_containers/inplace_vector/modifiers/single_insert.cc:\n> >         Updated check for the optional<T&> return. Added test for type\n> >         convertible to optional<T&>\n> >         *\n> testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc:\n> >         Use has_value() to check if engaged optional is returned.\n> >         *\n> testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc:\n> >         Likewise.\n> >         *\n> testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc:\n> >         Remove try_append_range tests.\n> >         *\n> testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc:\n> >         Removed.\n> >         * testsuite/23_containers/inplace_vector/version.cc: Updated\n> expected\n> >         feature test macro value.\n> > ---\n> > The exception_ptr change need to be handled seprately, due it being\n> > defined in libsup++.\n> >\n> > Testing on x86_64-linux. All *inplace_vector* test already passed.\n> > OK for trunk if all test finishes?\n> >\n> >  libstdc++-v3/include/bits/version.def         |  5 +-\n> >  libstdc++-v3/include/bits/version.h           |  4 +-\n> >  libstdc++-v3/include/debug/inplace_vector     | 26 ++-----\n> >  libstdc++-v3/include/std/inplace_vector       | 70 +++++--------------\n> >  .../debug/invalidation/try_append_range.cc    | 45 ------------\n> >  .../debug/invalidation/try_emplace_back.cc    |  2 +-\n> >  .../debug/invalidation/try_push_back.cc       |  4 +-\n> >  .../inplace_vector/modifiers/multi_insert.cc  | 46 ------------\n> >  .../inplace_vector/modifiers/single_insert.cc | 41 ++++++++---\n> >  .../23_containers/inplace_vector/version.cc   |  4 +-\n> >  10 files changed, 66 insertions(+), 181 deletions(-)\n> >  delete mode 100644\n> libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> >\n> > diff --git a/libstdc++-v3/include/bits/version.def\n> b/libstdc++-v3/include/bits/version.def\n> > index ada8da88bc5..998223306e2 100644\n> > --- a/libstdc++-v3/include/bits/version.def\n> > +++ b/libstdc++-v3/include/bits/version.def\n> > @@ -2223,9 +2223,12 @@ ftms = {\n> >  };\n> >\n> >  ftms = {\n> > +  // 202406 P0843R14 inplace_vector\n> > +  // 202603 P3981R2 Better return types in std::inplace_vector and\n> std::exception_ptr_cast\n> > +  //        P4022R0 Remove try_append_range from inplace_vector for now\n> >    name = inplace_vector;\n> >    values = {\n> > -    v = 202406;\n> > +    v = 202603;\n> >      cxxmin = 26;\n> >    };\n> >  };\n> > diff --git a/libstdc++-v3/include/bits/version.h\n> b/libstdc++-v3/include/bits/version.h\n> > index 0490e79dd41..cb3b9b0997e 100644\n> > --- a/libstdc++-v3/include/bits/version.h\n> > +++ b/libstdc++-v3/include/bits/version.h\n> > @@ -2488,9 +2488,9 @@\n> >\n> >  #if !defined(__cpp_lib_inplace_vector)\n> >  # if (__cplusplus >  202302L)\n> > -#  define __glibcxx_inplace_vector 202406L\n> > +#  define __glibcxx_inplace_vector 202603L\n> >  #  if defined(__glibcxx_want_all) ||\n> defined(__glibcxx_want_inplace_vector)\n> > -#   define __cpp_lib_inplace_vector 202406L\n> > +#   define __cpp_lib_inplace_vector 202603L\n> >  #  endif\n> >  # endif\n> >  #endif /* !defined(__cpp_lib_inplace_vector) */\n> > diff --git a/libstdc++-v3/include/debug/inplace_vector\n> b/libstdc++-v3/include/debug/inplace_vector\n> > index 750b0a7343c..e579e8636f9 100644\n> > --- a/libstdc++-v3/include/debug/inplace_vector\n> > +++ b/libstdc++-v3/include/debug/inplace_vector\n> > @@ -338,11 +338,12 @@ namespace __debug\n> >        }\n> >\n> >        template<typename... _Args>\n> > -       constexpr _Tp*\n> > +       constexpr optional<_Tp&>\n> >         try_emplace_back(_Args&&... __args)\n> >         {\n> >           auto __end = _Base::cend();\n> > -         _Tp* __res =\n> _Base::try_emplace_back(std::forward<_Args>(__args)...);\n> > +         optional<_Tp&> __res\n> > +           = _Base::try_emplace_back(std::forward<_Args>(__args)...);\n>\n> Is it valuable to state the type explicitly, rather than just using auto?\n>\nI like using `auto*` for pointers, instead of just auto, and the code was\neven\nmore explicit before, so I matched the style. I think it helps, but that\nmay be\nnovelty of optional<_Tp&>.\n\n>\n> I don't have a preference, so OK for trunk either way.\n>\nI will keep it as is then.\n\n>\n> >\n> >           if (__res)\n> >             this->_M_invalidate_if(_Equal(__end));\n> > @@ -350,11 +351,11 @@ namespace __debug\n> >           return __res;\n> >         }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(const _Tp& __x)\n> >        {\n> >         const auto __end = _Base::cend();\n> > -       _Tp* __res = _Base::try_push_back(__x);\n> > +       optional<_Tp&> __res = _Base::try_push_back(__x);\n> >\n> >         if (__res)\n> >           this->_M_invalidate_if(_Equal(__end));\n> > @@ -362,11 +363,11 @@ namespace __debug\n> >         return __res;\n> >        }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(_Tp&& __x)\n> >        {\n> >         const auto __end = _Base::cend();\n> > -       _Tp* __res = _Base::try_push_back(std::move(__x));\n> > +       optional<_Tp&> __res = _Base::try_push_back(std::move(__x));\n> >\n> >         if (__res)\n> >           this->_M_invalidate_if(_Equal(__end));\n> > @@ -374,19 +375,6 @@ namespace __debug\n> >         return __res;\n> >        }\n> >\n> > -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> > -       constexpr ranges::borrowed_iterator_t<_Rg>\n> > -       try_append_range(_Rg&& __rg)\n> > -       {\n> > -         const auto __size = size();\n> > -         const auto __end = _Base::cend();\n> > -         auto __res = _Base::try_append_range(__rg);\n> > -         if (size() != __size)\n> > -           this->_M_invalidate_if(_Equal(__end));\n> > -\n> > -         return __res;\n> > -       }\n> > -\n> >        template<typename... _Args>\n> >         constexpr _Tp&\n> >         unchecked_emplace_back(_Args&&... __args)\n> > diff --git a/libstdc++-v3/include/std/inplace_vector\n> b/libstdc++-v3/include/std/inplace_vector\n> > index c22a9e1f9b4..5ad92332a02 100644\n> > --- a/libstdc++-v3/include/std/inplace_vector\n> > +++ b/libstdc++-v3/include/std/inplace_vector\n> > @@ -38,6 +38,7 @@\n> >  #ifdef __glibcxx_inplace_vector // C++ >= 26\n> >  #include <compare>\n> >  #include <initializer_list>\n> > +#include <optional>\n> >  #include <bits/stdexcept_throw.h>\n> >  #include <bits/range_access.h>\n> >  #include <bits/ranges_base.h> // borrowed_iterator_t,\n> __detail::__container_compatible_range\n> > @@ -550,63 +551,31 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n> >        }\n> >\n> >        template<typename... _Args>\n> > -       constexpr _Tp*\n> > +       constexpr optional<_Tp&>\n> >         try_emplace_back(_Args&&... __args)\n> >         {\n> >           if (_M_size >= _Nm) [[unlikely]]\n> > -           return nullptr;\n> > -         auto& __r =\n> unchecked_emplace_back(std::forward<_Args>(__args)...);\n> > -         return __builtin_addressof(__r);\n> > +           return nullopt;\n> > +         return optional<_Tp&>(in_place,\n> > +\n> unchecked_emplace_back(std::forward<_Args>(__args)...));\n> >         }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(const _Tp& __x)\n> >        {\n> >         if (_M_size >= _Nm) [[unlikely]]\n> > -         return nullptr;\n> > -       return __builtin_addressof(unchecked_emplace_back(__x));\n> > +         return nullopt;\n> > +       return optional<_Tp&>(in_place, unchecked_emplace_back(__x));\n> >        }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(_Tp&& __x)\n> >        {\n> >         if (_M_size >= _Nm) [[unlikely]]\n> > -         return nullptr;\n> > -       return\n> __builtin_addressof(unchecked_emplace_back(std::move(__x)));\n> > +         return nullopt;\n> > +       return optional<_Tp&>(in_place,\n> unchecked_emplace_back(std::move(__x)));\n> >        }\n> >\n> > -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> > -       constexpr ranges::borrowed_iterator_t<_Rg>\n> > -       try_append_range(_Rg&& __rg)\n> > -       {\n> > -         if constexpr (ranges::sized_range<_Rg>)\n> > -           {\n> > -             auto __n = ranges::distance(__rg);\n> > -             if (__n == 0) [[unlikely]]\n> > -               return ranges::begin(__rg);\n> > -\n> > -             const auto __end = data() + _M_size;\n> > -             const size_t __avail = _Nm - size();\n> > -             if (__n <= __avail)\n> > -               _M_size += size_type(__n);\n> > -             else\n> > -               {\n> > -                 __n = __avail;\n> > -                 _M_size = _Nm;\n> > -               }\n> > -             return ranges::uninitialized_copy_n(\n> > -                      ranges::begin(__rg), __n,\n> > -                      __end, unreachable_sentinel).in;\n> > -           }\n> > -         else\n> > -           {\n> > -             ranges::subrange<pointer> __tail(data() + _M_size, data()\n> + _Nm);\n> > -             auto [__in, __out] = ranges::uninitialized_copy(__rg,\n> __tail);\n> > -             _M_size = __out - data();\n> > -             return std::move(__in);\n> > -           }\n> > -       }\n> > -\n> >        template<typename... _Args>\n> >         constexpr _Tp&\n> >         unchecked_emplace_back(_Args&&... __args)\n> > @@ -1208,22 +1177,17 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER\n> >        { __builtin_trap(); }\n> >\n> >        template<typename... _Args>\n> > -       constexpr _Tp*\n> > +        constexpr optional<_Tp&>\n> >         try_emplace_back(_Args&&...)\n> > -       { return nullptr; }\n> > +       { return nullopt; }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(const _Tp&)\n> > -      { return nullptr; }\n> > +      { return nullopt; }\n> >\n> > -      constexpr _Tp*\n> > +      constexpr optional<_Tp&>\n> >        try_push_back(_Tp&&)\n> > -      { return nullptr; }\n> > -\n> > -      template<__detail::__container_compatible_range<_Tp> _Rg>\n> > -       constexpr ranges::borrowed_iterator_t<_Rg>\n> > -       try_append_range(_Rg&& __rg)\n> > -       { return ranges::begin(__rg); }\n> > +      { return nullopt; }\n> >\n> >        template<typename... _Args>\n> >         [[noreturn]]\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> > deleted file mode 100644\n> > index ae4ac418f50..00000000000\n> > ---\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc\n> > +++ /dev/null\n> > @@ -1,45 +0,0 @@\n> > -// { dg-do run { target c++26 } }\n> > -\n> > -#include <debug/inplace_vector>\n> > -#include <testsuite_hooks.h>\n> > -\n> > -using __gnu_debug::inplace_vector;\n> > -\n> > -void test01()\n> > -{\n> > -  inplace_vector<int, 100> v(10, 17);\n> > -  inplace_vector<int, 10> v1(10, 19);\n> > -\n> > -  auto before = v.begin() + 6;\n> > -  auto last = v.end();\n> > -  auto end = last--;\n> > -\n> > -  v.try_append_range(v1);\n> > -\n> > -  VERIFY(before._M_dereferenceable());\n> > -  VERIFY(last._M_dereferenceable());\n> > -  VERIFY(end._M_singular());\n> > -}\n> > -\n> > -void test02()\n> > -{\n> > -  inplace_vector<int, 100> v(10, 17);\n> > -  inplace_vector<int, 0> v1;\n> > -\n> > -  auto before = v.begin() + 6;\n> > -  auto last = v.end();\n> > -  auto end = last--;\n> > -\n> > -  v.try_append_range(v1);\n> > -\n> > -  VERIFY(before._M_dereferenceable());\n> > -  VERIFY(last._M_dereferenceable());\n> > -  VERIFY(!end._M_singular());\n> > -}\n> > -\n> > -int main()\n> > -{\n> > -  test01();\n> > -  test02();\n> > -  return 0;\n> > -}\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> > index f7c8c7a9ba2..606d478a0dc 100644\n> > ---\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> > +++\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc\n> > @@ -13,7 +13,7 @@ void test01()\n> >    auto last = v.end();\n> >    auto end = last--;\n> >\n> > -  VERIFY( v.try_emplace_back(42) != nullptr );\n> > +  VERIFY( v.try_emplace_back(42).has_value() );\n> >\n> >    VERIFY(before._M_dereferenceable());\n> >    VERIFY(last._M_dereferenceable());\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> > index 04fc010e500..96af2b65b72 100644\n> > ---\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> > +++\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc\n> > @@ -14,7 +14,7 @@ void test01()\n> >    auto last = v.end();\n> >    auto end = last--;\n> >\n> > -  VERIFY( v.try_push_back(42) != nullptr );\n> > +  VERIFY( v.try_push_back(42).has_value() );\n> >\n> >    VERIFY(before._M_dereferenceable());\n> >    VERIFY(last._M_dereferenceable());\n> > @@ -30,7 +30,7 @@ void test02()\n> >    auto last = v.end();\n> >    auto end = last--;\n> >\n> > -  VERIFY( v.try_push_back(std::move(vv)) != nullptr );\n> > +  VERIFY( v.try_push_back(std::move(vv)).has_value() );\n> >\n> >    VERIFY(before._M_dereferenceable());\n> >    VERIFY(last._M_dereferenceable());\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> > index 454163892ad..e5a482cdc65 100644\n> > ---\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> > +++\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc\n> > @@ -54,16 +54,6 @@ test_add_to_full_it()\n> >\n> >    std::inplace_vector<T, N> v(std::from_range, std::span(a, a+N));\n> >\n> > -  Range r1(a, a);\n> > -  auto rit1 = v.try_append_range(r1);\n> > -  VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( rit1.base() == a );\n> > -\n> > -  SizedRange r2(a, a);\n> > -  auto rit2 = v.try_append_range(r2);\n> > -  VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( rit2.base() == a );\n> > -\n> >    v.append_range(Range(a, a));\n> >    VERIFY( eq<T>(v, {a, N}) );\n> >    v.append_range(SizedRange(a, a));\n> > @@ -93,17 +83,6 @@ test_add_to_full_it()\n> >    VERIFY( eq<T>(v, {a, N}) );\n> >    VERIFY( it == v.begin() );\n> >\n> > -  // Inserting non-empty range\n> > -  Range r3(a+3, a+5);\n> > -  auto rit3 = v.try_append_range(r3);\n> > -  VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( rit3.base() == a+3 );\n> > -\n> > -  SizedRange r4(a+2, a+5);\n> > -  auto rit4 = v.try_append_range(r4);\n> > -  VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( rit4.base() == a+2 );\n> > -\n> >  #ifdef __cpp_exceptions\n> >  #ifndef __cpp_lib_constexpr_exceptions\n> >    if consteval {\n> > @@ -265,30 +244,6 @@ test_append_range()\n> >  #endif\n> >  }\n> >\n> > -template<typename Range>\n> > -constexpr void\n> > -test_try_append_range()\n> > -{\n> > -  using T = std::ranges::range_value_t<Range>;\n> > -  T\n> a[]{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25};\n> > -\n> > -  std::inplace_vector<T, 20> v;\n> > -  Range r1 = Range(a, a+10);\n> > -  auto it1 = v.try_append_range(r1);\n> > -  VERIFY( eq<T>(v, {a, 10}) );\n> > -  VERIFY( it1.base() == a+10 );\n> > -\n> > -  Range r2 = Range(a+10, a+15);\n> > -  auto it2 = v.try_append_range(r2);\n> > -  VERIFY( eq<T>(v, {a, 15}) );\n> > -  VERIFY( it2.base() == a+15 );\n> > -\n> > -  Range r3 = Range(a+15, a+25);\n> > -  auto it3 = v.try_append_range(r3);\n> > -  VERIFY( eq<T>(v, {a, 20}) );\n> > -  VERIFY( it3.base() == a+20 );\n> > -}\n> > -\n> >  template<typename Range>\n> >  constexpr void\n> >  test_insert_range()\n> > @@ -357,7 +312,6 @@ constexpr void\n> >  do_test_ranges()\n> >  {\n> >    test_append_range<Range>();\n> > -  test_try_append_range<Range>();\n> >    test_insert_range<Range>();\n> >  }\n> >\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> > index 92bd765982e..245af928800 100644\n> > ---\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> > +++\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/modifiers/single_insert.cc\n> > @@ -3,6 +3,7 @@\n> >  #include <inplace_vector>\n> >\n> >  #include <span>\n> > +#include <optional>\n> >  #include <testsuite_hooks.h>\n> >\n> >  struct X\n> > @@ -18,6 +19,20 @@ struct X\n> >    friend auto operator<=>(const X&, const X&) = default;\n> >  };\n> >\n> > +// Type that is convertible to optional<Y&>\n> > +struct Y\n> > +{\n> > +  Y() = default;\n> > +  constexpr Y(int p) : v(p) {}\n> > +\n> > +  constexpr operator std::optional<Y&>()\n> > +  { return std::nullopt; }\n> > +\n> > +  int v;\n> > +\n> > +  friend auto operator<=>(const Y&, const Y&) = default;\n> > +};\n> > +\n> >  template<typename T, typename V, size_t N>\n> >  constexpr bool\n> >  eq(const std::inplace_vector<V, N>& l, std::span<const T> r) {\n> > @@ -40,11 +55,11 @@ test_add_to_full()\n> >\n> >    std::inplace_vector<T, N> v(std::from_range, std::span(a, a+N));\n> >\n> > -  VERIFY( v.try_emplace_back(1) == nullptr );\n> > +  VERIFY( !v.try_emplace_back(1).has_value() );\n> >    VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( v.try_push_back(T(1)) == nullptr );\n> > +  VERIFY( !v.try_push_back(T(1)).has_value() );\n> >    VERIFY( eq<T>(v, {a, N}) );\n> > -  VERIFY( v.try_push_back(c) == nullptr );\n> > +  VERIFY( !v.try_push_back(c).has_value() );\n> >    VERIFY( eq<T>(v, {a, N}) );\n> >\n> >  #ifdef __cpp_exceptions\n> > @@ -149,15 +164,18 @@ test_inserts()\n> >    v.unchecked_push_back(c);\n> >    VERIFY( eq<T>(v, {a+3, 6}) );\n> >\n> > -  T* ptr = v.try_emplace_back(7);\n> > +  std::optional<T&> opt = v.try_emplace_back(7);\n> >    VERIFY( eq<T>(v, {a+3, 7}) );\n> > -  VERIFY( ptr = &v.back() );\n> > -  ptr = v.try_push_back(T(8));\n> > +  VERIFY( opt.has_value() );\n> > +  VERIFY( &*opt == &v.back() );\n> > +  opt = v.try_push_back(T(8));\n> >    VERIFY( eq<T>(v, {a+3, 8}) );\n> > -  VERIFY( ptr = &v.back() );\n> > -  ptr = v.try_push_back(c);\n> > +  VERIFY( opt.has_value() );\n> > +  VERIFY( &*opt == &v.back() );\n> > +  opt = v.try_push_back(c);\n> >    VERIFY( eq<T>(v, {a+3, 9}) );\n> > -  VERIFY( ptr = &v.back() );\n> > +  VERIFY( opt.has_value() );\n> > +  VERIFY( &*opt == &v.back() );\n> >\n> >    auto it = v.emplace(v.end(), 10);\n> >    VERIFY( eq<T>(v, {a+3, 10}) );\n> > @@ -195,12 +213,15 @@ int main()\n> >    auto test_all = [] {\n> >      test_add_to_full<0, int>();\n> >      test_add_to_full<0, X>();\n> > +    test_add_to_full<0, Y>();\n> >\n> >      test_add_to_full<4, int>();\n> > +    test_add_to_full<4, Y>();\n> >\n> >      test_inserts<int>();\n> > +    test_inserts<Y>();\n> >  #ifdef __cpp_lib_constexpr_inplace_vector\n> > -#error uncomemnt test_inserts<X>()\n> > +#error enable tests bellow\n> >  #endif\n> >      if ! consteval {\n> >        test_add_to_full<4, X>();\n> > diff --git\n> a/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> b/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> > index a5bbdb8464b..493e86dc6dd 100644\n> > --- a/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> > +++ b/libstdc++-v3/testsuite/23_containers/inplace_vector/version.cc\n> > @@ -5,7 +5,7 @@\n> >\n> >  #ifndef __cpp_lib_inplace_vector\n> >  # error \"Feature-test macro for inplace_vector missing in\n> <inplace_vector>\"\n> > -#elif __cpp_lib_inplace_vector != 202406L\n> > +#elif __cpp_lib_inplace_vector != 202603L\n> >  # error \"Feature-test macro for inplace_vector has wrong value in\n> <inplace_vector>\"\n> >  #endif\n> >\n> > @@ -15,6 +15,6 @@\n> >\n> >  #ifndef __cpp_lib_inplace_vector\n> >  # error \"Feature-test macro for inplace_vector missing in <version>\"\n> > -#elif __cpp_lib_inplace_vector != 202406L\n> > +#elif __cpp_lib_inplace_vector != 202603L\n> >  # error \"Feature-test macro for inplace_vector has wrong value in\n> <version>\"\n> >  #endif\n> > --\n> > 2.53.0\n> >\n>\n>","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Ceq4s/Rz;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Ceq4s/Rz","sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","sourceware.org; spf=pass smtp.mailfrom=redhat.com","server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmgL85yFYz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 22:56:15 +1100 (AEDT)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 467274BA23F5\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 11:56:13 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id D30DE4BA2E36\n for <gcc-patches@gcc.gnu.org>; Thu,  2 Apr 2026 11:55:29 +0000 (GMT)","from mail-yw1-f200.google.com (mail-yw1-f200.google.com\n [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-374-thd1egCoPgqo40CFJwRoog-1; Thu, 02 Apr 2026 07:55:27 -0400","by mail-yw1-f200.google.com with SMTP id\n 00721157ae682-798531a0f58so13835227b3.0\n for <gcc-patches@gcc.gnu.org>; Thu, 02 Apr 2026 04:55:27 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 467274BA23F5","OpenDKIM Filter v2.11.0 sourceware.org D30DE4BA2E36"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org D30DE4BA2E36","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org D30DE4BA2E36","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775130930; cv=none;\n b=DenIWPXzcOZRx5Pgw/7AXGpq1JVk4ghdsnDeN7/ivMTOs/t6WD1CjMZU2mNzXqcrK25bEqxvZg3v7zTt9oqLH/oxbB6fbpHuzIJmU4ISq79TUXIBhGDyzhSc32uh1a5Vbw3iqLS440C/m21BQEsuq05X4S9ETJ4ev4wCFg1JBIY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775130930; c=relaxed/simple;\n bh=Qbh1fCddBOKFiVz6gCnTbF6Y0xnK/XMUMaLmJrzYarQ=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=GrIMBkIZF06ErHcEZi2a725EHtPaVo7Z27bWiS5hMI2wnoO4VqLu/yw1Slap0jeah2xOKjljmHO2lQWZRkgY18rUzeq4yx9CeLZTG/R6cd1CKXjet/7HjUiYFcgkEuDW4wfldKuxUsSdSJO/RG2gwsFMcqovmTbnKt0zwha80g4=","ARC-Authentication-Results":"i=1; server2.sourceware.org","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775130928;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n in-reply-to:in-reply-to:references:references;\n bh=gAQWfdqR6/+pnWFzXUKByK0rV0E/i3OfcGeCdQbwZdQ=;\n b=Ceq4s/RzTlqarMt5P0bgTIOHIYNaSOSXPKp0hUctLDqKDsVj7APNo8jWdl9iN2umW+Mau2\n VuzszSlYb5u80xIssedS7jRR324sn45vZ371bFrlLQF1jumZ+v4gyUAnzWvCEnBM5jP8hu\n AWKEGDDjqQ99KhXABDOWx/zDKXeFfOI=","X-MC-Unique":"thd1egCoPgqo40CFJwRoog-1","X-Mimecast-MFC-AGG-ID":"thd1egCoPgqo40CFJwRoog_1775130927","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775130927; x=1775735727;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=gAQWfdqR6/+pnWFzXUKByK0rV0E/i3OfcGeCdQbwZdQ=;\n b=pr5XN6+uU16HtNEXKqVYJ/L32Yt7SF7JDFPnp0eiR8tkOtbtpJeA0+Mu9uOcWrNTV3\n GSeqIiJKCdATEMzvo96lN3NKkwhnlybhUGEGa/MAt3PAvQ8KgCIk3tczXL5FHT9TtqZx\n sM8t/HyR2R9mrD4H1T8HOkfa5kmdaqLvjwc8V+elCLFVr7zsAZxHEaMfNwaNUPwYQpPU\n BqLGWTX+nyK3AGDsIPPdYjIMw6Zb9MCUHmoebdgSKZp8U0VuW8lAwoBO4bMqpC3ny7v/\n otzcJCXhAjpvohto5nrpp17lo+c7c/GjmKNVzo2Mu9oYdI2Qf5opIR3bN+GJ/7PNSfdc\n G0CQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCX5H8GiwnuYGCWeCtlpV2oxOt9tIGBktkZ6MOmzTTSBTL3rb+kKaolhHKN2KC9qM4PHeR+zvI94D1KrDg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YyKWAP3FVnJODegm3tUDauv9ncvKMCnZD/Q6fFiYv+3jFhHNsfp\n LRT3sROiU275q/YEtgXeYFAj8gHRt9JfuOiBS/VBe2yq2BygtljmhD+yWVLqEIHCjOBN6HM2NlA\n uRX82JgFqMH/bJzp+TvlwK/SroRGKSt/FQZdQ41WNXOP8fB41lNKMpNkuyX5eyanrAlWDX1yBB9\n eTyIXpzxzZNla9evJGwG8RuQCxFKtwgranBA==","X-Gm-Gg":"AeBDiesR/WdHt8LqUqmSGq0iSNURKygYH7FRWqnBPyKlL1iRfLn6oZVyk5wwZpHAd0Z\n 0NG36NE0zfScNreshkPvDe9qRwDHvVVdnblGtmH9KbgLS+R/dvOeQRdzH9mJsc8it8Q+FlvfpCv\n BlPHkM+wff9BG3G9/kH3dfETpM1S19YHGxugs01GdTvQCsXuVWVDDAoC9j4WZPeXQkGeqaQIup5\n D6otNP3myAQebT3sq/j3H+DNXOODynEA5iJXeoMjQ+EWmIJPhN0ydrVT5y1K1Bg2hpj","X-Received":["by 2002:a05:690c:6610:b0:79b:ccb6:a837 with SMTP id\n 00721157ae682-7a37b8278b2mr26417277b3.5.1775130926567;\n Thu, 02 Apr 2026 04:55:26 -0700 (PDT)","by 2002:a05:690c:6610:b0:79b:ccb6:a837 with SMTP id\n 00721157ae682-7a37b8278b2mr26417067b3.5.1775130926042; Thu, 02 Apr 2026\n 04:55:26 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20260402104238.340807-1-tkaminsk@redhat.com>\n <CACb0b4=2HRdZwUOKGUBSx55BrbT-DUb+yDMHW9GhPEo9VyqpBg@mail.gmail.com>","In-Reply-To":"\n <CACb0b4=2HRdZwUOKGUBSx55BrbT-DUb+yDMHW9GhPEo9VyqpBg@mail.gmail.com>","From":"Tomasz Kaminski <tkaminsk@redhat.com>","Date":"Thu, 2 Apr 2026 13:55:14 +0200","X-Gm-Features":"AQROBzAh2UbEBvTVWbpOp6ilWnVOQuZPcyZw_IjQhhDLvXHfmIODWHN4YCrk7mw","Message-ID":"\n <CAKvuMXBhoTr93UTmkxJPtDPi-A9hfsge3eNEgf+LU0rV7DUNow@mail.gmail.com>","Subject":"Re: [PATCH] libstdc++: Updated inplace_vector::try_ functions per\n P3981R2 and P4022R0.","To":"Jonathan Wakely <jwakely@redhat.com>","Cc":"libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"Eox3eXPUZBqEZYo3DiQXw1FvVseEhnFJhi-dz8a1DuI_1775130927","X-Mimecast-Originator":"redhat.com","Content-Type":"multipart/alternative; boundary=\"00000000000046f0cf064e78e094\"","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}}]