===================================================================
@@ -150,22 +150,10 @@
pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
pair&
- operator=(const pair& __p)
- {
- first = __p.first;
- second = __p.second;
- return *this;
- }
+ operator=(const pair&) = default;
pair&
- operator=(pair&& __p)
- noexcept(__and_<is_nothrow_move_assignable<_T1>,
- is_nothrow_move_assignable<_T2>>::value)
- {
- first = std::forward<first_type>(__p.first);
- second = std::forward<second_type>(__p.second);
- return *this;
- }
+ operator=(pair&&) = default;
template<class _U1, class _U2>
pair&
===================================================================
@@ -0,0 +1,54 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+// Copyright (C) 2013 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
+// <http://www.gnu.org/licenses/>.
+
+#include <utility>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+
+typedef std::pair<int, int> tt1;
+typedef std::pair<int, double> tt2;
+typedef std::pair<const int, int> tt3;
+typedef std::pair<int, const int> tt4;
+typedef std::pair<NoexceptCopyAssignClass,
+ NoexceptCopyAssignClass> tt5;
+typedef std::pair<ExceptCopyAssignClass, ExceptCopyAssignClass> tt6;
+typedef std::pair<ExceptCopyAssignClass, double> tt7;
+typedef std::pair<NoexceptCopyAssignClass,
+ ExceptCopyAssignClass> tt8;
+typedef std::pair<int,
+ DeletedCopyAssignClass> tt9;
+typedef std::pair<int,
+ DeletedMoveAssignClass> tt10;
+//typedef std::pair<DeletedMoveAssignClass,
+// DeletedMoveAssignClass> tt11;
+
+
+static_assert(std::is_move_assignable<tt1>::value, "Error");
+static_assert(std::is_move_assignable<tt2>::value, "Error");
+static_assert(std::is_move_assignable<tt3>::value, "Error");
+static_assert(std::is_move_assignable<tt4>::value, "Error");
+static_assert(std::is_move_assignable<tt5>::value, "Error");
+static_assert(std::is_move_assignable<tt6>::value, "Error");
+static_assert(std::is_move_assignable<tt7>::value, "Error");
+static_assert(std::is_move_assignable<tt8>::value, "Error");
+static_assert(std::is_move_assignable<tt9>::value, "Error");
+static_assert(std::is_move_assignable<tt10>::value, "Error");
+//static_assert(!std::is_move_assignable<tt11>::value, "Error");
===================================================================
@@ -0,0 +1,51 @@
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+// Copyright (C) 2013 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
+// <http://www.gnu.org/licenses/>.
+
+#include <utility>
+#include <testsuite_tr1.h>
+
+using namespace __gnu_test;
+
+typedef std::pair<int, int> tt1;
+typedef std::pair<int, double> tt2;
+typedef std::pair<const int, int> tt3;
+typedef std::pair<int, const int> tt4;
+typedef std::pair<NoexceptCopyAssignClass,
+ NoexceptCopyAssignClass> tt5;
+typedef std::pair<ExceptCopyAssignClass, ExceptCopyAssignClass> tt6;
+typedef std::pair<ExceptCopyAssignClass, double> tt7;
+typedef std::pair<NoexceptCopyAssignClass,
+ ExceptCopyAssignClass> tt8;
+typedef std::pair<int,
+ DeletedCopyAssignClass> tt9;
+//typedef std::pair<int,
+// DeletedMoveAssignClass> tt10;
+
+
+static_assert(std::is_copy_assignable<tt1>::value, "Error");
+static_assert(std::is_copy_assignable<tt2>::value, "Error");
+static_assert(!std::is_copy_assignable<tt3>::value, "Error");
+static_assert(!std::is_copy_assignable<tt4>::value, "Error");
+static_assert(std::is_copy_assignable<tt5>::value, "Error");
+static_assert(std::is_copy_assignable<tt6>::value, "Error");
+static_assert(std::is_copy_assignable<tt7>::value, "Error");
+static_assert(std::is_copy_assignable<tt8>::value, "Error");
+static_assert(!std::is_copy_assignable<tt9>::value, "Error");
+//static_assert(std::is_copy_assignable<tt10>::value, "Error");