diff mbox

[v3] Define tuple copy constructor explicitly-defaulted

Message ID 4C10D9D2.3070008@oracle.com
State New
Headers show

Commit Message

Paolo Carlini June 10, 2010, 12:25 p.m. UTC
Hi,

noticed while fixing the last PR, tested x86_64-linux, committed.

Paolo.

//////////////////
2010-06-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (tuple(const tuple&)): Define explicitly-defaulted.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Tweak dg-warning
	line number.
diff mbox

Patch

Index: include/std/tuple
===================================================================
--- include/std/tuple	(revision 160528)
+++ include/std/tuple	(working copy)
@@ -238,8 +238,7 @@ 
         tuple(_UElements&&... __elements)
 	: _Inherited(std::forward<_UElements>(__elements)...) {	}
 
-      tuple(const tuple& __in)
-      : _Inherited(static_cast<const _Inherited&>(__in)) { }
+      tuple(const tuple&) = default;
 
       tuple(tuple&& __in)
       : _Inherited(static_cast<_Inherited&&>(__in)) { }
@@ -321,8 +320,7 @@ 
         tuple(_U1&& __a1, _U2&& __a2)
 	: _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { }
 
-      tuple(const tuple& __in)
-      : _Inherited(static_cast<const _Inherited&>(__in)) { }
+      tuple(const tuple&) = default;
 
       tuple(tuple&& __in)
       : _Inherited(static_cast<_Inherited&&>(__in)) { }
Index: testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
===================================================================
--- testsuite/20_util/weak_ptr/comparison/cmp_neg.cc	(revision 160528)
+++ testsuite/20_util/weak_ptr/comparison/cmp_neg.cc	(working copy)
@@ -44,7 +44,7 @@ 
 // { dg-warning "note" "" { target *-*-* } 324 }
 // { dg-warning "note" "" { target *-*-* } 423 }
 // { dg-warning "note" "" { target *-*-* } 862 }
-// { dg-warning "note" "" { target *-*-* } 512 }
+// { dg-warning "note" "" { target *-*-* } 510 }
 // { dg-warning "note" "" { target *-*-* } 1005 }
 // { dg-warning "note" "" { target *-*-* } 340 }
 // { dg-warning "note" "" { target *-*-* } 290 }