Files
Tomasz Kamiński 8b95d5f5b2 libstdc++: Updated inplace_vector::try_ functions per P3981R2 and P4022R0.
This paper removes the try_append_range from inplace_vector and changes the
return type of try_emplace_back and try_push_back to optional<_Tp&> per:
P4022R0: Remove try_append_range from inplace_vector for now.
P3981R2: Better return types in std::inplace_vector and std::exception_ptr_cast.

The test are also expanded to cover type Y, that is convertible to optional<Y&>,
and require return type to be constructed using in_place.

libstdc++-v3/ChangeLog:

	* include/bits/version.def (inplace_vector): Bump to 202603.
	* include/bits/version.h: Regenerate.
	* include/std/inplace_vector (inplace_vector::try_emplace_back)
	(inplace_vector::try_push_back): Change return type to optional<_Tp&>
	and adjust implementation accordingly.
	(inplace_vector::try_append_range): Remove.
	* include/debug/inplace_vector (inplace_vector::try_emplace_back)
	(inplace_vector::try_push_back, inplace_vector::try_append_range):
	Likewise.
	* testsuite/23_containers/inplace_vector/modifiers/single_insert.cc:
	Updated check for the optional<T&> return. Added test for type
	convertible to optional<T&>
	* testsuite/23_containers/inplace_vector/debug/invalidation/try_emplace_back.cc:
	Use has_value() to check if engaged optional is returned.
	* testsuite/23_containers/inplace_vector/debug/invalidation/try_push_back.cc:
	Likewise.
	* testsuite/23_containers/inplace_vector/modifiers/multi_insert.cc:
	Remove try_append_range tests.
	* testsuite/23_containers/inplace_vector/debug/invalidation/try_append_range.cc:
	Removed.
	* testsuite/23_containers/inplace_vector/version.cc: Updated expected
	feature test macro value.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
2026-04-02 15:50:16 +02:00
..
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00