diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-05-20 14:08:53 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-05-20 14:08:53 +0000 |
commit | ab6bfd90cb6aac5628a32d063de4ae33a8828ae1 (patch) | |
tree | bdc39e05493cc47205e56123795eaf68c2aeeda3 | |
parent | 5797be120a8d9634261ddb9acbd2d179dc0d20db (diff) | |
download | gcc-ab6bfd90cb6aac5628a32d063de4ae33a8828ae1.zip gcc-ab6bfd90cb6aac5628a32d063de4ae33a8828ae1.tar.gz gcc-ab6bfd90cb6aac5628a32d063de4ae33a8828ae1.tar.bz2 |
stl_pair.h (pair<>::pair(const pair&)): Defaulted in C++0x mode.
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.
From-SVN: r159628
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_pair.h | 11 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 72b704e..be72417 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -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. diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 0618026..6c2b51e 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -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); diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc index 6165db0..cbe5f9f 100644 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc @@ -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 } |