This is the mail archive of the
libstdc++-cvs@gcc.gnu.org
mailing list for the libstdc++ project.
r141512 - in /trunk/libstdc++-v3: ChangeLog inc...
- From: paolo at gcc dot gnu dot org
- To: libstdc++-cvs at gcc dot gnu dot org
- Date: Sat, 01 Nov 2008 11:29:07 -0000
- Subject: r141512 - in /trunk/libstdc++-v3: ChangeLog inc...
Author: paolo
Date: Sat Nov 1 11:29:06 2008
New Revision: 141512
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141512
Log:
2008-11-01 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/shared_ptr.h: Update comparisons to match WP.
(_Sp_counted_ptr): Make copy and assignment members deleted.
(_Sp_counted_deleter): Remove private copy and assignment members.
(__shared_count::_M_less,__weak_count::_M_less,operator<): Replace
friend operator< with overloaded _M_less member functions to allow
comparison with either shared_count or weak_count.
(__shared_ptr::_M_less,__weak_ptr::_M_less): Replace with...
(__shared_ptr::owner_before,__weak_ptr::owner_before): New overloads
for ownership-based ordering.
(operator<(__shared_ptr,__shared_ptr)): Compare stored pointers,
make non-friend.
(operator==(__shared_ptr,__shared_ptr)): Make non-friend.
(operator!=(__shared_ptr,__shared_ptr)): Likewise.
(less<__shared_ptr<>>,less<shared_ptr<>>,_Sp_less): Explicitly call
pointer specialization.
(__weak_ptr::operator<,weak_ptr::operator<=,weak_ptr::operator>,
weak_ptr::operator>=): Remove operator< and delete all comparisons.
(_Sp_owner_less,owner_less): Predicate for ownership-based ordering.
(operator<(shared_ptr,shared_ptr): Overload for derived shared_ptr.
(operator==(shared_ptr,shared_ptr): Likewise.
(operator!=(shared_ptr,shared_ptr): Likewise.
(swap(shared_ptr,shared_ptr)): Fix parameter types.
(swap(weak_ptr,weak_ptr)): Add missing overload.
* testsuite/20_util/owner_less/cmp.cc: New.
* testsuite/20_util/shared_ptr/comparison/cmp.cc: Test other ops.
* testsuite/20_util/shared_ptr/comparison/less.cc: New.
* testsuite/20_util/shared_ptr/observers/owner_before.cc: New.
* testsuite/20_util/weak_ptr/observers/owner_before.cc: New.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: New.
Added:
trunk/libstdc++-v3/testsuite/20_util/owner_less/
trunk/libstdc++-v3/testsuite/20_util/owner_less/cmp.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/less.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/observers/owner_before.cc
trunk/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/
trunk/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
trunk/libstdc++-v3/testsuite/20_util/weak_ptr/observers/
trunk/libstdc++-v3/testsuite/20_util/weak_ptr/observers/owner_before.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/shared_ptr.h
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/comparison/cmp.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/observers/bool_conv.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/observers/get.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/observers/unique.cc
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/observers/use_count.cc