From 2789f415a19db97588b65f237de3ea9ba5ba8da2 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 21 May 2011 00:05:03 +0000 Subject: char_traits.h: Use noexcept throughout. 2011-05-20 Paolo Carlini * 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. From-SVN: r173986 --- libstdc++-v3/ChangeLog | 15 ++++ libstdc++-v3/include/bits/char_traits.h | 94 +++++++++++----------- libstdc++-v3/include/bits/stl_pair.h | 8 +- libstdc++-v3/include/std/tuple | 24 +++--- libstdc++-v3/include/std/typeindex | 16 ++-- .../20_util/pair/cons/noexcept_move_construct.cc | 42 ++++++++++ .../testsuite/20_util/pair/noexcept_move_assign.cc | 42 ++++++++++ .../testsuite/20_util/pair/noexcept_swap.cc | 81 +++++++++++++++++++ .../20_util/tuple/cons/noexcept_move_construct.cc | 59 ++++++++++++++ .../20_util/weak_ptr/comparison/cmp_neg.cc | 4 +- 10 files changed, 311 insertions(+), 74 deletions(-) create mode 100644 libstdc++-v3/testsuite/20_util/pair/cons/noexcept_move_construct.cc create mode 100644 libstdc++-v3/testsuite/20_util/pair/noexcept_move_assign.cc create mode 100644 libstdc++-v3/testsuite/20_util/pair/noexcept_swap.cc create mode 100644 libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_move_construct.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 68edbdb..113acf5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,18 @@ +2011-05-20 Paolo Carlini + + * 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. + 2011-05-20 Jason Merrill * include/ext/pb_ds/assoc_container.hpp: Explicitly qualify calls to diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h index 07251df..2024a33 100644 --- a/libstdc++-v3/include/bits/char_traits.h +++ b/libstdc++-v3/include/bits/char_traits.h @@ -1,7 +1,7 @@ // Character Traits for use by standard string and iostream -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009, 2010 +// 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -241,15 +241,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef mbstate_t state_type; static void - assign(char_type& __c1, const char_type& __c2) + assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool - eq(const char_type& __c1, const char_type& __c2) + eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool - lt(const char_type& __c1, const char_type& __c2) + lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } static int @@ -277,25 +277,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return static_cast(__builtin_memset(__s, __a, __n)); } static _GLIBCXX_CONSTEXPR char_type - to_char_type(const int_type& __c) + to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return static_cast(__c); } // To keep both the byte 0xff and the eof symbol 0xffffffff // from ending up as 0xffffffff. static _GLIBCXX_CONSTEXPR int_type - to_int_type(const char_type& __c) + to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return static_cast(static_cast(__c)); } static _GLIBCXX_CONSTEXPR bool - eq_int_type(const int_type& __c1, const int_type& __c2) + eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type - eof() + eof() _GLIBCXX_NOEXCEPT { return static_cast(_GLIBCXX_STDIO_EOF); } static _GLIBCXX_CONSTEXPR int_type - not_eof(const int_type& __c) + not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return (__c == eof()) ? 0 : __c; } }; @@ -312,15 +312,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef mbstate_t state_type; static void - assign(char_type& __c1, const char_type& __c2) + assign(char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { __c1 = __c2; } static _GLIBCXX_CONSTEXPR bool - eq(const char_type& __c1, const char_type& __c2) + eq(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR bool - lt(const char_type& __c1, const char_type& __c2) + lt(const char_type& __c1, const char_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 < __c2; } static int @@ -348,23 +348,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return wmemset(__s, __a, __n); } static _GLIBCXX_CONSTEXPR char_type - to_char_type(const int_type& __c) + to_char_type(const int_type& __c) _GLIBCXX_NOEXCEPT { return char_type(__c); } static _GLIBCXX_CONSTEXPR int_type - to_int_type(const char_type& __c) + to_int_type(const char_type& __c) _GLIBCXX_NOEXCEPT { return int_type(__c); } static _GLIBCXX_CONSTEXPR bool - eq_int_type(const int_type& __c1, const int_type& __c2) + eq_int_type(const int_type& __c1, const int_type& __c2) _GLIBCXX_NOEXCEPT { return __c1 == __c2; } static _GLIBCXX_CONSTEXPR int_type - eof() + eof() _GLIBCXX_NOEXCEPT { return static_cast(WEOF); } static _GLIBCXX_CONSTEXPR int_type - not_eof(const int_type& __c) + not_eof(const int_type& __c) _GLIBCXX_NOEXCEPT { return eq_int_type(__c, eof()) ? 0 : __c; } }; #endif //_GLIBCXX_USE_WCHAR_T @@ -391,15 +391,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef mbstate_t state_type; static void - assign(char_type& __c1, const char_type& __c2) + assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } - static _GLIBCXX_CONSTEXPR bool - eq(const char_type& __c1, const char_type& __c2) + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } - static _GLIBCXX_CONSTEXPR bool - lt(const char_type& __c1, const char_type& __c2) + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int @@ -453,24 +453,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __s; } - static _GLIBCXX_CONSTEXPR char_type - to_char_type(const int_type& __c) + static constexpr char_type + to_char_type(const int_type& __c) noexcept { return char_type(__c); } - static _GLIBCXX_CONSTEXPR int_type - to_int_type(const char_type& __c) + static constexpr int_type + to_int_type(const char_type& __c) noexcept { return int_type(__c); } - static _GLIBCXX_CONSTEXPR bool - eq_int_type(const int_type& __c1, const int_type& __c2) + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } - static _GLIBCXX_CONSTEXPR int_type - eof() + static constexpr int_type + eof() noexcept { return static_cast(-1); } - static _GLIBCXX_CONSTEXPR int_type - not_eof(const int_type& __c) + static constexpr int_type + not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; @@ -484,15 +484,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef mbstate_t state_type; static void - assign(char_type& __c1, const char_type& __c2) + assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } - static _GLIBCXX_CONSTEXPR bool - eq(const char_type& __c1, const char_type& __c2) + static constexpr bool + eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } - static _GLIBCXX_CONSTEXPR bool - lt(const char_type& __c1, const char_type& __c2) + static constexpr bool + lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int @@ -546,24 +546,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __s; } - static _GLIBCXX_CONSTEXPR char_type - to_char_type(const int_type& __c) + static constexpr char_type + to_char_type(const int_type& __c) noexcept { return char_type(__c); } - static _GLIBCXX_CONSTEXPR int_type - to_int_type(const char_type& __c) + static constexpr int_type + to_int_type(const char_type& __c) noexcept { return int_type(__c); } - static _GLIBCXX_CONSTEXPR bool - eq_int_type(const int_type& __c1, const int_type& __c2) + static constexpr bool + eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } - static _GLIBCXX_CONSTEXPR int_type - eof() + static constexpr int_type + eof() noexcept { return static_cast(-1); } - static _GLIBCXX_CONSTEXPR int_type - not_eof(const int_type& __c) + static constexpr int_type + not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index e2fc16d..fbb475b 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -112,7 +112,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __GXX_EXPERIMENTAL_CXX0X__ constexpr pair(const pair&) = default; - // Implicit. + // Implicit?!? Breaks containers!!! // pair(pair&&) = default; // DR 811. @@ -134,6 +134,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template pair(pair<_U1, _U2>&& __p) + noexcept(std::is_nothrow_constructible<_T1, _U1&&>::value + && std::is_nothrow_constructible<_T2, _U2&&>::value) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } @@ -153,8 +155,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION pair& operator=(pair&& __p) - noexcept(is_nothrow_move_assignable<_T1>::value - && is_nothrow_move_assignable<_T2>::value) + noexcept(std::is_nothrow_move_assignable<_T1>::value + && std::is_nothrow_move_assignable<_T2>::value) { first = std::move(__p.first); second = std::move(__p.second); diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index dc9330d..fee94e2 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::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 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 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; diff --git a/libstdc++-v3/include/std/typeindex b/libstdc++-v3/include/std/typeindex index 79b3ead..a92c296 100644 --- a/libstdc++-v3/include/std/typeindex +++ b/libstdc++-v3/include/std/typeindex @@ -1,6 +1,6 @@ // C++0x typeindex -*- C++ -*- -// Copyright (C) 2010 Free Software Foundation, Inc. +// Copyright (C) 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,31 +48,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ struct type_index { - type_index(const type_info& __rhs) + type_index(const type_info& __rhs) noexcept : _M_target(&__rhs) { } bool - operator==(const type_index& __rhs) const + operator==(const type_index& __rhs) const noexcept { return *_M_target == *__rhs._M_target; } bool - operator!=(const type_index& __rhs) const + operator!=(const type_index& __rhs) const noexcept { return *_M_target != *__rhs._M_target; } bool - operator<(const type_index& __rhs) const + operator<(const type_index& __rhs) const noexcept { return _M_target->before(*__rhs._M_target); } bool - operator<=(const type_index& __rhs) const + operator<=(const type_index& __rhs) const noexcept { return !__rhs._M_target->before(*_M_target); } bool - operator>(const type_index& __rhs) const + operator>(const type_index& __rhs) const noexcept { return __rhs._M_target->before(*_M_target); } bool - operator>=(const type_index& __rhs) const + operator>=(const type_index& __rhs) const noexcept { return !_M_target->before(*__rhs._M_target); } size_t diff --git a/libstdc++-v3/testsuite/20_util/pair/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/20_util/pair/cons/noexcept_move_construct.cc new file mode 100644 index 0000000..911bb92 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/pair/cons/noexcept_move_construct.cc @@ -0,0 +1,42 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-05-20 Paolo Carlini +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +using namespace __gnu_test; + +typedef std::pair tt1; +typedef std::pair tt2; +typedef std::pair tt3; +typedef std::pair tt4; +typedef std::pair tt5; +typedef std::pair tt6; + +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); diff --git a/libstdc++-v3/testsuite/20_util/pair/noexcept_move_assign.cc b/libstdc++-v3/testsuite/20_util/pair/noexcept_move_assign.cc new file mode 100644 index 0000000..ee8edca --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/pair/noexcept_move_assign.cc @@ -0,0 +1,42 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-05-20 Paolo Carlini +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +using namespace __gnu_test; + +typedef std::pair tt1; +typedef std::pair tt2; +typedef std::pair tt3; +typedef std::pair tt4; +typedef std::pair tt5; +typedef std::pair tt6; + +static_assert(std::is_nothrow_move_assignable::value, "Error"); +static_assert(std::is_nothrow_move_assignable::value, "Error"); +static_assert(std::is_nothrow_move_assignable::value, "Error"); +static_assert(!std::is_nothrow_move_assignable::value, "Error"); +static_assert(!std::is_nothrow_move_assignable::value, "Error"); +static_assert(!std::is_nothrow_move_assignable::value, "Error"); diff --git a/libstdc++-v3/testsuite/20_util/pair/noexcept_swap.cc b/libstdc++-v3/testsuite/20_util/pair/noexcept_swap.cc new file mode 100644 index 0000000..e82b616 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/pair/noexcept_swap.cc @@ -0,0 +1,81 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-05-20 Paolo Carlini +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +using namespace __gnu_test; + +typedef std::pair tt1; +typedef std::pair tt2; +typedef std::pair tt4; +typedef std::pair tt6; +typedef std::pair tt9; +typedef std::pair tt10; +typedef std::pair tt11; +typedef std::pair tt12; +typedef std::pair tt13; +typedef std::pair tt14; +typedef std::pair tt15; +typedef std::pair tt16; +typedef std::pair tt17; +typedef std::pair tt19; +typedef std::pair tt21; + +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(noexcept(std::declval().swap(std::declval())), + "Error"); +static_assert(!noexcept(std::declval().swap(std::declval())), + "Error"); diff --git a/libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_move_construct.cc new file mode 100644 index 0000000..801b5fa --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_move_construct.cc @@ -0,0 +1,59 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-05-20 Paolo Carlini +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include + +using namespace __gnu_test; + +typedef std::tuple tt1; +typedef std::tuple tt2; +typedef std::tuple tt3; +typedef std::tuple tt4; +typedef std::tuple tt5; +typedef std::tuple tt6; +typedef std::tuple tt7; +typedef std::tuple tt8; +typedef std::tuple tt9; +typedef std::tuple tt10; +typedef std::tuple tt11; +typedef std::tuple tt12; + +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); +static_assert(!std::is_nothrow_move_constructible::value, "Error"); 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 d449be3..9db39d2 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 @@ -51,9 +51,9 @@ main() // { dg-warning "note" "" { target *-*-* } 485 } // { dg-warning "note" "" { target *-*-* } 479 } // { dg-warning "note" "" { target *-*-* } 469 } -// { dg-warning "note" "" { target *-*-* } 637 } +// { dg-warning "note" "" { target *-*-* } 633 } // { dg-warning "note" "" { target *-*-* } 1056 } // { dg-warning "note" "" { target *-*-* } 1050 } // { dg-warning "note" "" { target *-*-* } 342 } // { dg-warning "note" "" { target *-*-* } 292 } -// { dg-warning "note" "" { target *-*-* } 212 } +// { dg-warning "note" "" { target *-*-* } 214 } -- cgit v1.1