summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/array/element_access
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2014-05-13 18:22:08 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2014-05-13 18:22:08 +0100
commitb82f988e8d21c709426d691329cf025e978d94ed (patch)
tree28ad5ef3ed4989d00d219267165efbbd8fdf08f6 /libstdc++-v3/testsuite/23_containers/array/element_access
parent54fde020ccdc4bbb163fb6d481743342d9ee2deb (diff)
downloadgcc-b82f988e8d21c709426d691329cf025e978d94ed.tar.gz
re PR libstdc++/60497 (unique_ptr<T> tries to complete its type T even though it's not required to be a complete type)
PR libstdc++/60497 * include/debug/array (get): Qualify call to other get overload. * include/profile/array (get): Likewise. * include/std/array (get): Likewise. * include/std/functional (_Mu, _Bind, _Bind_result): Qualify std::get. * include/std/mutex (unique_lock, call_once): Use __addressof. (__unlock_impl): Remove unused template. (__try_to_lock): Declare inline. (__try_lock_impl::__do_try_lock): Qualify function calls. (lock): Avoid narrowing conversion. * testsuite/20_util/bind/60497.cc: New. * testsuite/23_containers/array/element_access/60497.cc: New. * testsuite/30_threads/call_once/60497.cc: New. * testsuite/30_threads/unique_lock/cons/60497.cc: New. From-SVN: r210388
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/array/element_access')
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/element_access/60497.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/array/element_access/60497.cc b/libstdc++-v3/testsuite/23_containers/array/element_access/60497.cc
new file mode 100644
index 00000000000..14932a1b303
--- /dev/null
+++ b/libstdc++-v3/testsuite/23_containers/array/element_access/60497.cc
@@ -0,0 +1,38 @@
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+//
+// Copyright (C) 2014 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/>.
+
+// libstdc++/60497
+
+#include <array>
+#include <debug/array>
+#include <profile/array>
+#include <memory>
+
+struct A;
+template<typename T> struct B { T t; };
+
+std::array<B<A>*, 1> a;
+auto b = std::get<0>(std::move(a));
+
+std::__debug::array<B<A>*, 1> c;
+auto d = std::__debug::get<0>(std::move(c));
+
+std::__profile::array<B<A>*, 1> e;
+auto f = std::__profile::get<0>(std::move(e));