OSDN Git Service

2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 May 2010 14:08:53 +0000 (14:08 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 May 2010 14:08:53 +0000 (14:08 +0000)
* include/bits/stl_pair.h (pair<>::pair(const pair&)): Defaulted
in C++0x mode.
(pair<>::operator=(const pair<>&)): Add in C++0x mode.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
line number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159628 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 72b704e..be72417 100644 (file)
@@ -1,3 +1,11 @@
+2010-05-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/stl_pair.h (pair<>::pair(const pair&)): Defaulted
+       in C++0x mode.
+       (pair<>::operator=(const pair<>&)): Add in C++0x mode.
+       * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
+       line number.
+
 2010-05-19  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * testsuite/30_threads/future/members/wait.cc (wait): Rename.
index 0618026..6c2b51e 100644 (file)
@@ -98,6 +98,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
       : first(__a), second(__b) { }
 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
+      pair(const pair&) = default;
+
       // DR 811.
       template<class _U1, class = typename
               std::enable_if<std::is_convertible<_U1, _T1>::value>::type>
@@ -152,6 +154,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
 
       template<class _U1, class _U2>
         pair&
+        operator=(const pair<_U1, _U2>& __p)
+       {
+         first = __p.first;
+         second = __p.second;
+         return *this;
+       }
+
+      template<class _U1, class _U2>
+        pair&
         operator=(pair<_U1, _U2>&& __p)
        {
          first = std::move(__p.first);
index 6165db0..cbe5f9f 100644 (file)
@@ -48,4 +48,4 @@ main()
 // { dg-warning "note" "" { target *-*-* } 1005 }
 // { dg-warning "note" "" { target *-*-* } 340 }
 // { dg-warning "note" "" { target *-*-* } 290 }
-// { dg-warning "note" "" { target *-*-* } 190 }
+// { dg-warning "note" "" { target *-*-* } 201 }