diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-21 00:05:03 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-21 00:05:03 +0000 |
| commit | a0a4d76dcf2d9503b1a0e7b1b9c87c6abb4da28d (patch) | |
| tree | 86c7c965f23f3734503384e7957b5e55c45ff13a /libstdc++-v3/include/std/tuple | |
| parent | 5a19c8cca35ad285fd6ee174d6b4f04c12e9fc02 (diff) | |
| download | ppe42-gcc-a0a4d76dcf2d9503b1a0e7b1b9c87c6abb4da28d.tar.gz ppe42-gcc-a0a4d76dcf2d9503b1a0e7b1b9c87c6abb4da28d.zip | |
2011-05-20 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/char_traits.h: Use noexcept throughout.
* include/std/typeindex: Likewise.
* include/std/tuple (_Tuple_impl<>_Tuple_impl(_Tuple_impl&&)): Use
noexcept; adjust callers.
* include/bits/stl_pair.h (pair<>::pair(pair<>&&)): Use noexcept.
* testsuite/20_util/tuple/cons/noexcept_move_construct.cc: New.
* testsuite/20_util/pair/cons/noexcept_move_construct.cc: Likewise.
* testsuite/20_util/pair/noexcept_swap.cc: Likewise.
* testsuite/20_util/pair/noexcept_move_assign.cc: Likewise.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
line numbers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/tuple')
| -rw-r--r-- | libstdc++-v3/include/std/tuple | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index dc9330d0b59..fee94e26e52 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -169,6 +169,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Tuple_impl(const _Tuple_impl&) = default; _Tuple_impl(_Tuple_impl&& __in) + noexcept(std::is_nothrow_move_constructible<_Head>::value + && std::is_nothrow_move_constructible<_Inherited>::value) : _Inherited(std::move(__in._M_tail())), _Base(std::forward<_Head>(__in._M_head())) { } @@ -191,8 +193,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Tuple_impl& operator=(_Tuple_impl&& __in) - noexcept(is_nothrow_move_assignable<_Head>::value - && is_nothrow_move_assignable<_Inherited>::value) + noexcept(std::is_nothrow_move_assignable<_Head>::value + && std::is_nothrow_move_assignable<_Inherited>::value) { _M_head() = std::forward<_Head>(__in._M_head()); _M_tail() = std::move(__in._M_tail()); @@ -252,9 +254,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Inherited(std::forward<_UElements>(__elements)...) { } constexpr tuple(const tuple&) = default; - - tuple(tuple&& __in) - : _Inherited(static_cast<_Inherited&&>(__in)) { } + tuple(tuple&&) = default; template<typename... _UElements, typename = typename std::enable_if<sizeof...(_UElements) @@ -278,7 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tuple& operator=(tuple&& __in) - noexcept(is_nothrow_move_assignable<_Inherited>::value) + noexcept(std::is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; @@ -337,9 +337,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } constexpr tuple(const tuple&) = default; - - tuple(tuple&& __in) - : _Inherited(static_cast<_Inherited&&>(__in)) { } + tuple(tuple&&) = default; template<typename _U1, typename _U2> tuple(const tuple<_U1, _U2>& __in) @@ -367,7 +365,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tuple& operator=(tuple&& __in) - noexcept(is_nothrow_move_assignable<_Inherited>::value) + noexcept(std::is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; @@ -434,9 +432,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Inherited(std::forward<_U1>(__a1)) { } constexpr tuple(const tuple&) = default; - - tuple(tuple&& __in) - : _Inherited(static_cast<_Inherited&&>(__in)) { } + tuple(tuple&&) = default; template<typename _U1> tuple(const tuple<_U1>& __in) @@ -455,7 +451,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION tuple& operator=(tuple&& __in) - noexcept(is_nothrow_move_assignable<_Inherited>::value) + noexcept(std::is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; |

