http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61023

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.2
   Target Milestone|---                         |4.9.1
            Summary|set/map move assignment     |[4.9/4.10 Regression]
                   |doesn't move (or copy) the  |set/map move assignment
                   |comparator                  |doesn't move (or copy) the
                   |                            |comparator

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Testing this:

--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -1073,6 +1073,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
     _M_move_assign(_Rb_tree& __x)
     {
+      _M_impl._M_key_compare = std::move(__x._M_impl._M_key_compare);
       if (_Alloc_traits::_S_propagate_on_move_assign()
          || _Alloc_traits::_S_always_equal()
          || _M_get_Node_allocator() == __x._M_get_Node_allocator())

But the more I think about it the less sure I am whether we want to move or
just copy the functor from the source. In the move constructor we only copy.

Reply via email to