]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
shared_ptr_base.h (__weak_ptr): Remove deleted comparison operators, per DR 1256.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 19 Feb 2010 10:42:47 +0000 (10:42 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 19 Feb 2010 10:42:47 +0000 (10:42 +0000)
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.

From-SVN: r156891

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr.h
libstdc++-v3/include/bits/shared_ptr_base.h
libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc

index 4ac1d58aa318586c456865f50b0012d3e2a3b81f..e75016ca7a32c0a596fd8c954113230e666d7e7e 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 3e909f53f9fef5043ceeb04dbea04a54e80f5d22..b204699db20c2aa12e9664c5fd552bd5e7d32ba0 100644 (file)
@@ -367,16 +367,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        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.
index 51bd51d471856a3096041c3a4233f856e1ddeb48..9d36faf7cc7970f5873b33768c037db8956789e1 100644 (file)
@@ -1022,19 +1022,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        _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
index f73f5c761095339a07754662663e0047784480ed..5cbd55cfa50b39b12b84517ba2573826c8f93bc3 100644 (file)
@@ -1,7 +1,7 @@
 // { 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
@@ -21,7 +21,6 @@
 // 20.6.6.3 Template class weak_ptr [util.smartptr.weak]
 
 #include <memory>
-#include <testsuite_hooks.h>
 
 struct A { };
 
@@ -30,10 +29,10 @@ 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