gcc/libstdc++-v3/include
Jonathan Wakely bf548ce3e6 libstdc++: Simplify emplace member functions in _Rb_tree
This introduces a new RAII type to simplify the emplace members which
currently use try-catch blocks to deallocate a node if an exception is
thrown by the comparisons done during insertion. The new type is created
on the stack and manages the allocation of a new node and deallocates it
in the destructor if it wasn't inserted into the tree. It also provides
helper functions for doing the insertion, releasing ownership of the
node to the tree.

Also, we don't need to use long qualified names if we put the return
type after the nested-name-specifier.

libstdc++-v3/ChangeLog:

	* include/bits/stl_tree.h (_Rb_tree::_Auto_node): Define new
	RAII helper for creating and inserting new nodes.
	(_Rb_tree::_M_insert_node): Use trailing-return-type to simplify
	out-of-line definition.
	(_Rb_tree::_M_insert_lower_node): Likewise.
	(_Rb_tree::_M_insert_equal_lower_node): Likewise.
	(_Rb_tree::_M_emplace_unique): Likewise. Use _Auto_node.
	(_Rb_tree::_M_emplace_equal): Likewise.
	(_Rb_tree::_M_emplace_hint_unique): Likewise.
	(_Rb_tree::_M_emplace_hint_equal): Likewise.
2021-12-03 22:52:27 +00:00
..
backward
bits libstdc++: Simplify emplace member functions in _Rb_tree 2021-12-03 22:52:27 +00:00
c
c_compatibility
c_global
c_std
debug libstdc++: Define std::__is_constant_evaluated() for internal use 2021-12-01 15:00:33 +00:00
decimal
experimental libstdc++: [_GLIBCXX_DEBUG] Reduce performance impact on std::erase_if 2021-11-20 16:11:22 +01:00
ext libstdc++: Fix circular dependency for bitmap_allocator [PR103381] 2021-11-23 12:30:57 +00:00
parallel
precompiled libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
pstl
std libstdc++: Define std::__is_constant_evaluated() for internal use 2021-12-01 15:00:33 +00:00
tr1
tr2
Makefile.am libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
Makefile.in libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00