summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-03 11:49:12 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-03 11:49:12 +0000
commit6b75e1228cecab24ff5650ca0e98b8f7aae8d5ad (patch)
tree0eaf34c95af482c6071365bbd8c1795345165567 /libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc
parentad3827a6836ecc050d7f688b4716e8f2a9c66e12 (diff)
downloadgcc-6b75e1228cecab24ff5650ca0e98b8f7aae8d5ad.tar.gz
2007-05-03 Benjamin Kosnik <bkoz@redhat.com>
* include/std/type_traits (enable_if): New. (conditional): New. (__decay_selector, decay): New. (__cv_selector, __match_cv_qualifiers): New. (__make_unsigned, __make_unsigned_selector, make_unsigned): New. (__make_signed, __make_signed_selector, make_signed): New. (has_trivial_constructor): ... to has_trivial_default_constructor. (has_nothrow_constructor): ... to has_nothrow_default_constructor. (has_trivial_copy): ... to has_trivial_copy_constructor. (has_nothrow_copy): ... to has_nothrow_copy_constructor. * include/tr1/type_traits_fwd: Move to... * include/tr1/type_traitsfwd: ... this, consistency with ios/string/locale forward headers. * include/tr1/type_traits: Adjust include. * include/Makefile.am (tr1_headers): Change type_traits_fwd.h to type_traitsfwd.h. * include/Makefile.in: Regenerate. * testsuite/23_containers/tuple: Move... * testsuite/20_util/tuple:... here. * testsuite/20_util/conditional: New. * testsuite/20_util/conditional/requirements: Same. * testsuite/20_util/conditional/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/conditional/requirements/typedefs.cc: Same. * testsuite/20_util/decay: Same. * testsuite/20_util/decay/requirements: Same. * testsuite/20_util/decay/requirements/explicit_instantiation.cc: Same. * testsuite/20_util/decay/requirements/typedefs.cc: Same. * testsuite/20_util/enable_if: Same. * testsuite/20_util/enable_if/requirements: Same. * testsuite/20_util/enable_if/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/enable_if/requirements/typedefs.cc: Same. * testsuite/20_util/enable_if/requirements/typedefs_neg.cc: Same. * testsuite/20_util/has_nothrow_copy_constructor: Same. * testsuite/20_util/has_nothrow_copy_constructor/requirements: Same. * testsuite/20_util/has_nothrow_copy_constructor/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/has_nothrow_copy_constructor/requirements/ typedefs.cc: Same. * testsuite/20_util/has_nothrow_copy_constructor/value.cc: Same. * testsuite/20_util/has_nothrow_default_constructor: Same. * testsuite/20_util/has_nothrow_default_constructor/requirements: Same. * testsuite/20_util/has_nothrow_default_constructor/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/has_nothrow_default_constructor/requirements/ typedefs.cc: Same. * testsuite/20_util/has_nothrow_default_constructor/value.cc: Same. * testsuite/20_util/has_trivial_copy_constructor: Same. * testsuite/20_util/has_trivial_copy_constructor/requirements: Same. * testsuite/20_util/has_trivial_copy_constructor/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/has_trivial_copy_constructor/requirements/ typedefs.cc: Same. * testsuite/20_util/has_trivial_copy_constructor/value.cc: Same. * testsuite/20_util/has_trivial_default_constructor: Same. * testsuite/20_util/has_trivial_default_constructor/requirements: Same. * testsuite/20_util/has_trivial_default_constructor/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/has_trivial_default_constructor/requirements/ typedefs.cc: Same. * testsuite/20_util/has_trivial_default_constructor/value.cc: Same. * testsuite/20_util/headers/type_traits/types_std_c++0x_neg.cc: Same. * testsuite/20_util/make_signed: Same. * testsuite/20_util/make_signed/requirements: Same. * testsuite/20_util/make_signed/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs.cc: Same. * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Same. * testsuite/20_util/make_unsigned: Same. * testsuite/20_util/make_unsigned/requirements: Same. * testsuite/20_util/make_unsigned/requirements/ explicit_instantiation.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs.cc: Same. * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc')
-rw-r--r--libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc
new file mode 100644
index 00000000000..daff6ad3fb4
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs_neg.cc
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// 2007-05-02 Benjamin Kosnik <bkoz@redhat.com>
+//
+// Copyright (C) 2007 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 2, 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 COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+#include <type_traits>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ bool test __attribute__((unused)) = true;
+ using std::enable_if;
+
+ // Negative tests.
+ typedef enable_if<false, int>::type test2_type;
+}
+
+// { dg-error "does not name a type" "" { target *-*-* } 33 }