summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-18 02:58:06 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-18 02:58:06 +0000
commite6014a82ae8a4aec4fb4bee768401c7da3549d97 (patch)
tree025d5854011b99cfe93205d711317cfd2947da24 /libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc
parent05d36c46715e8b9ad4692b7c91da4594cf0d9826 (diff)
downloadgcc-e6014a82ae8a4aec4fb4bee768401c7da3549d97.tar.gz
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* gcc/c-family/c-common.c (c_common_reswords): Add __bases, __direct_bases. * gcc/c-family/c-common.h: Add RID_BASES and RID_DIRECT_BASES. 2011-10-17 Michael Spertus <mike_spertus@symantec.com> * cp-tree.def: Add BASES as a new tree code. * cp-tree.h (enum cp_trait_kind): Add CPTK_BASES, CPTK_DIRECT_BASES. (BASES_TYPE, BASES_DIRECT): Define. (calculate_bases, finish_bases, calculate_direct_bases): Declare. * parser.c (cp_parser_trait_expr, cp_parser_template_argument_list, (cp_parser_simple_type_specifier, cp_parser_save_nsdmi): Use them. * pt.c (find_parameter_packs_r, tsubst_pack_expansion): Likewise. * semantics.c (calculate_bases, finish_bases, calculate_direct_bases, dfs_calculate_bases_pre, dfs_calculate_bases_post, calculate_bases_helper): Define. 2011-10-17 Michael Spertus <mike_spertus@symantec.com> * g++.dg/ext/bases.C: New test. 2011-10-17 Michael Spertus <mike_spertus@symantec.com> * include/tr2/type_traits (bases, direct_bases, typelist): New. 2011-10-17 Benjamin Kosnik <bkoz@redhat.com> * libstdc++-v3/include/Makefile.am: Add tr2 directory and includes. * libstdc++-v3/include/Makefile.in: Regenerate. * scripts/create_testsuite_files: Search tr2 directory. * testsuite/libstdc++-dg/conformance.exp: Same. * testsuite/tr2/bases/requirements/explicit_instantiation.cc: New. * testsuite/tr2/bases/requirements/typedefs.cc: New. * testsuite/tr2/bases/value.cc: New. * testsuite/tr2/direct_bases/requirements/ explicit_instantiation.cc: New. * testsuite/tr2/direct_bases/requirements/typedefs.cc: New. * testsuite/tr2/direct_bases/value.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc')
-rw-r--r--libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc b/libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc
new file mode 100644
index 00000000000..7d219ea3ffc
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr2/direct_bases/requirements/typedefs.cc
@@ -0,0 +1,31 @@
+// { dg-options "-std=gnu++0x" }
+// { dg-do compile }
+
+// 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
+// <http://www.gnu.org/licenses/>.
+
+//
+// NB: This file is for testing tr1/type_traits with NO OTHER INCLUDES.
+
+#include <tr2/type_traits>
+
+void test01()
+{
+ // Check for required typedefs
+ typedef std::tr2::direct_bases<int> test_type;
+ typedef test_type::type value_type;
+}