public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/61023] [4.9/4.10 Regression] set/map move assignment doesn't move (or copy) the comparator
Date: Wed, 07 May 2014 13:15:00 -0000	[thread overview]
Message-ID: <bug-61023-4-WAVT2e7vWj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61023-4@http.gcc.gnu.org/bugzilla/>

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.


  parent reply	other threads:[~2014-05-07 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 22:24 [Bug libstdc++/61023] New: " nevin at eviloverlord dot com
2014-04-30 22:27 ` [Bug libstdc++/61023] " nevin at eviloverlord dot com
2014-04-30 22:35 ` nevin at eviloverlord dot com
2014-05-01 21:25 ` nevin at eviloverlord dot com
2014-05-04 15:56 ` redi at gcc dot gnu.org
2014-05-06 23:50 ` ppluzhnikov at google dot com
2014-05-07 13:15 ` redi at gcc dot gnu.org [this message]
2014-05-07 14:12 ` [Bug libstdc++/61023] [4.9/4.10 Regression] " redi at gcc dot gnu.org
2014-05-07 14:13 ` redi at gcc dot gnu.org
2014-05-07 14:16 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61023-4-WAVT2e7vWj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).