This is PR 96088 but this time for _Rb_tree based containers. I guess it won't go in for the moment but I wanted to submit it already because of the changes I had to do in stl_functions.h. It sounds like missing parts for C++11 move-semantic. I still need to run all tests to see if they can have side effects.      libstdc++: [_Rb_tree] Limit allocation on iterator insertion [PR 96088]     Detect when invoking the comparer require an allocation and in this case     create a temporary instance that will be moved to storage location if the     insertion eventually takes place. Avoid to allocate a node otherwise.     libstdc++-v3/ChangeLog:             PR libstdc++/96088             * include/bits/stl_function.h             (std::less<>::operator()): Add noexcept qualification.             (std::greater::operator()): Likewise. (std::_Identity<>::operator<_Tp2>(_Tp2&&)): New perfect forwarding operator. (std::_Select1st<>::operator<_Pair2>(_Pair2&&)): New move operator.             * include/bits/stl_tree.h (_Rb_tree<>::_ConvertToValueType<>): New helper type.             (_Rb_tree<>::_M_get_insert_unique_pos_tr): New.             (_Rb_tree<>::_S_forward_key): New.             (_Rb_tree<>::_M_emplace_unique_kv): New.             (_Rb_tree<>::_M_emplace_unique_aux): New, use latter.             (_Rb_tree<>::_M_emplace_unique): New, use latter.             * testsuite/23_containers/map/96088.cc: New test case.             * testsuite/23_containers/multimap/96088.cc: New test case.             * testsuite/23_containers/multiset/96088.cc: New test case.             * testsuite/23_containers/set/96088.cc: New test case. Ok to commit ? François