summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr1
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 22:30:54 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-05 22:30:54 +0000
commit9b380c637c5952c1784231e1a3f933be89ce5e1a (patch)
tree7584d9bea179abf3e1b5e9560f20601b94287d12 /libstdc++-v3/testsuite/tr1
parent0c1a7e456fcf8eeacda02921c9fb00883755a75f (diff)
downloadgcc-9b380c637c5952c1784231e1a3f933be89ce5e1a.tar.gz
2010-11-05 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/user.cfg.in: Remove tr1_impl headers. * testsuite/tr1/4_metaprogramming/integral_constant/requirements/ constexpr_data.cc: New. * testsuite/util/testsuite_tr1.h (LType, LTypeDerived, NLType): New. * testsuite/20_util/is_literal_type/value.cc: New. * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Name. * testsuite/20_util/is_literal_type/requirements/ explicit_instantiation.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166381 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/tr1')
-rw-r--r--libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc52
1 files changed, 52 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc b/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc
new file mode 100644
index 00000000000..52497e1f443
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/4_metaprogramming/integral_constant/requirements/constexpr_data.cc
@@ -0,0 +1,52 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2010 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 <type_traits>
+#include <testsuite_common_types.h>
+
+namespace __gnu_test
+{
+ struct constexpr_member_data
+ {
+ template<typename _Ttesttype>
+ void
+ operator()()
+ {
+ struct _Concept
+ {
+ void __constraint()
+ {
+ constexpr auto v __attribute__((unused)) (_Ttesttype::value);
+ }
+ };
+
+ _Concept c;
+ c.__constraint();
+ }
+ };
+}
+
+int main()
+{
+ __gnu_test::constexpr_member_data test;
+ test.operator()<std::integral_constant<unsigned short, 69>>();
+ test.operator()<std::integral_constant<bool, true>>();
+ return 0;
+}