aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-05 11:31:30 +0000
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-05 11:31:30 +0000
commit600faa6895cfa7897499f67d6a3a37d0a542f5e2 (patch)
tree36950ac70eb4e8a947ae9965514be24ace1ed31d /libstdc++-v3/testsuite
parentca943582f78a8dc78c882e4b7d0a8af4b8cc3612 (diff)
PR libstdc++/70437
* include/bits/stl_pair.h (_ConstructiblePair, _ImplicitlyConvertiblePair, _MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Add shortcut conditions for same-type cases. * testsuite/20_util/pair/70437.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234743 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/20_util/pair/70437.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/pair/70437.cc b/libstdc++-v3/testsuite/20_util/pair/70437.cc
new file mode 100644
index 00000000000..37e6fb7ec1a
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/pair/70437.cc
@@ -0,0 +1,37 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// Copyright (C) 2016 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>
+
+template <class T> struct B;
+
+template <class T> struct A
+{
+ A(A&&) = default;
+ A(const B<T> &);
+};
+
+template <class T> struct B
+{
+ std::pair<A<T>,int> a;
+ B(B&&) = default;
+};
+
+bool b = std::is_move_constructible<A<int> >::value;