libstdc++: _Rb_tree code cleanup, remove lambdas
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 12 Feb 2020 17:38:57 +0000 (18:38 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 20 Nov 2020 19:56:10 +0000 (20:56 +0100)
commit90bf60c3c24c6c99ebbecf9d08a6d0d916d73721
treef61dafb1ed2fdbb99e39b15e1ba3a08822737e35
parentd1081010a1addfcf156b7042f581f0698ea25f61
libstdc++: _Rb_tree code cleanup, remove lambdas

Use new template parameters to replace usage of lambdas to move or not
tree values on copy.

libstdc++-v3/ChangeLog:

* include/bits/move.h (_GLIBCXX_FWDREF): New.
* include/bits/stl_tree.h: Adapt to use latter.
(_Rb_tree<>::_M_clone_node): Add _MoveValue template parameter.
(_Rb_tree<>::_M_mbegin): New.
(_Rb_tree<>::_M_begin): Use latter.
(_Rb_tree<>::_M_copy): Add _MoveValues template parameter.
* testsuite/23_containers/map/allocator/move_cons.cc: New test.
* testsuite/23_containers/multimap/allocator/move_cons.cc: New test.
* testsuite/23_containers/multiset/allocator/move_cons.cc: New test.
* testsuite/23_containers/set/allocator/move_cons.cc: New test.
libstdc++-v3/include/bits/move.h
libstdc++-v3/include/bits/stl_tree.h
libstdc++-v3/testsuite/23_containers/map/allocator/move_cons.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multimap/allocator/move_cons.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/multiset/allocator/move_cons.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/set/allocator/move_cons.cc [new file with mode: 0644]