Commit 258e15e0 by Paolo Carlini Committed by Paolo Carlini

re PR libstdc++/46821 ([C++0x] swapping empty classes)

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

	PR libstdc++/46821
	* include/std/tuple (_Head_base<,, true>::_M_swap_impl):
	Swap the empty bases.
	(_Head_base<,, false>::_M_swap_impl): Minor tweak.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

From-SVN: r167497
parent 1a23b861
2010-12-06 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/46821
* include/std/tuple (_Head_base<,, true>::_M_swap_impl):
Swap the empty bases.
(_Head_base<,, false>::_M_swap_impl): Minor tweak.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
line number.
2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com> 2010-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40125 PR target/40125
...@@ -54,7 +63,7 @@ ...@@ -54,7 +63,7 @@
* testsuite/23_containers/deque/cons/2.cc: Fix to explicitly invoke * testsuite/23_containers/deque/cons/2.cc: Fix to explicitly invoke
the copy constructor with or without C++0x mode. the copy constructor with or without C++0x mode.
* testsuite/23_containers/vector/cons/4.cc: Likewise. * testsuite/23_containers/vector/cons/4.cc: Likewise.
2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* scripts/extract_symvers.pl: New file. * scripts/extract_symvers.pl: New file.
......
...@@ -78,7 +78,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -78,7 +78,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
const _Head& _M_head() const { return *this; } const _Head& _M_head() const { return *this; }
void void
_M_swap_impl(_Head&) { /* no-op */ } _M_swap_impl(_Head& __h)
{
using std::swap;
swap(__h, _M_head());
}
}; };
template<std::size_t _Idx, typename _Head> template<std::size_t _Idx, typename _Head>
...@@ -101,7 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -101,7 +105,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_swap_impl(_Head& __h) _M_swap_impl(_Head& __h)
{ {
using std::swap; using std::swap;
swap(__h, _M_head_impl); swap(__h, _M_head());
} }
_Head _M_head_impl; _Head _M_head_impl;
......
...@@ -44,7 +44,7 @@ main() ...@@ -44,7 +44,7 @@ main()
// { dg-warning "note" "" { target *-*-* } 350 } // { dg-warning "note" "" { target *-*-* } 350 }
// { dg-warning "note" "" { target *-*-* } 1082 } // { dg-warning "note" "" { target *-*-* } 1082 }
// { dg-warning "note" "" { target *-*-* } 465 } // { dg-warning "note" "" { target *-*-* } 465 }
// { dg-warning "note" "" { target *-*-* } 581 } // { dg-warning "note" "" { target *-*-* } 585 }
// { dg-warning "note" "" { target *-*-* } 1027 } // { dg-warning "note" "" { target *-*-* } 1027 }
// { dg-warning "note" "" { target *-*-* } 340 } // { dg-warning "note" "" { target *-*-* } 340 }
// { dg-warning "note" "" { target *-*-* } 290 } // { dg-warning "note" "" { target *-*-* } 290 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment