This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/48635] [C++0x] unique_ptr<T, D&> moves the deleter instead of copying it
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Apr 2011 21:47:17 +0000
- Subject: [Bug libstdc++/48635] [C++0x] unique_ptr<T, D&> moves the deleter instead of copying it
- Auto-submitted: auto-generated
- References: <bug-48635-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48635
--- Comment #10 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-04-17 21:46:23 UTC ---
Author: paolo
Date: Sun Apr 17 21:46:20 2011
New Revision: 172620
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172620
Log:
2011-04-17 Daniel Krugler <daniel.kruegler@googlemail.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/48635 (again)
* include/bits/unique_ptr.h (unique_ptr<>::unique_ptr(unique_ptr<>&&),
unique_ptr<_Tp[]>::unique_ptr(unique_ptr<>&&),
unique_ptr<>::operator=(unique_ptr<>&&),
unique_ptr<_Tp[]>::operator=(unique_ptr<>&&)): Use forward<_Ep>, not
forward<_Dp>, to forward the deleter.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: New.
Added:
branches/gcc-4_6-branch/libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc
Modified:
branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
branches/gcc-4_6-branch/libstdc++-v3/include/bits/unique_ptr.h