* include/bits/shared_ptr_base.h (__weak_ptr): Remove deleted
comparison operators, per DR 1256.
* include/bits/shared_ptr.h (weak_ptr): Likewise.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156891
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-02-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/shared_ptr_base.h (__weak_ptr): Remove deleted
+ comparison operators, per DR 1256.
+ * include/bits/shared_ptr.h (weak_ptr): Likewise.
+ * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust.
+
2010-02-18 Benjamin Kosnik <bkoz@redhat.com>
* scripts/run_doxygen: Add shortnames option.
return this->expired() ? shared_ptr<_Tp>() : shared_ptr<_Tp>(*this);
#endif
}
-
- // Comparisons
- template<typename _Tp1>
- bool operator<(const weak_ptr<_Tp1>&) const = delete;
- template<typename _Tp1>
- bool operator<=(const weak_ptr<_Tp1>&) const = delete;
- template<typename _Tp1>
- bool operator>(const weak_ptr<_Tp1>&) const = delete;
- template<typename _Tp1>
- bool operator>=(const weak_ptr<_Tp1>&) const = delete;
};
// 20.8.13.3.7 weak_ptr specialized algorithms.
_M_refcount._M_swap(__s._M_refcount);
}
- // Comparisons
- template<typename _Tp1>
- bool operator<(const __weak_ptr<_Tp1, _Lp>&) const = delete;
-
- template<typename _Tp1>
- bool operator<=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
-
- template<typename _Tp1>
- bool operator>(const __weak_ptr<_Tp1, _Lp>&) const = delete;
-
- template<typename _Tp1>
- bool operator>=(const __weak_ptr<_Tp1, _Lp>&) const = delete;
-
private:
// Used by __enable_shared_from_this.
void
// { dg-options "-std=gnu++0x " }
// { dg-do compile }
-// Copyright (C) 2008, 2009 Free Software Foundation
+// Copyright (C) 2008, 2009, 2010 Free Software Foundation
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// 20.6.6.3 Template class weak_ptr [util.smartptr.weak]
#include <memory>
-#include <testsuite_hooks.h>
struct A { };
int
test01()
{
- std::weak_ptr<A> p1;
- // { dg-excess-errors "deleted function" }
- p1 < p1; // { dg-error "used here" }
- return 0;
+ std::weak_ptr<A> p1;
+ // { dg-excess-errors "candidates are" }
+ p1 < p1; // { dg-error "no match" }
+ return 0;
}
int