From d9e3d0bf0cfc76ba11600abfdbf09bd79e932775 Mon Sep 17 00:00:00 2001 From: paolo Date: Sun, 8 Dec 2013 09:44:48 +0000 Subject: [PATCH] 2013-12-08 Paolo Carlini * testsuite/20_util/add_const/requirements/explicit_instantiation.cc: New. * testsuite/20_util/add_const/value.cc: Likewise. * testsuite/20_util/add_cv/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/add_cv/value.cc: Likewise. * testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/add_pointer/value.cc: Likewise. * testsuite/20_util/add_volatile/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/add_volatile/value.cc: Likewise. * testsuite/20_util/alignment_of/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/alignment_of/requirements/typedefs.cc: Likewise. * testsuite/20_util/alignment_of/value.cc: Likewise. * testsuite/20_util/extent/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/extent/requirements/typedefs.cc: Likewise. * testsuite/20_util/extent/value.cc: Likewise. * testsuite/20_util/has_virtual_destructor/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/has_virtual_destructor/requirements/ typedefs.cc: Likewise. * testsuite/20_util/has_virtual_destructor/value.cc: Likewise. * testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_abstract/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_abstract/value.cc: Likewise. * testsuite/20_util/is_arithmetic/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/is_arithmetic/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_arithmetic/value.cc: Likewise. * testsuite/20_util/is_array/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_array/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_array/value.cc: Likewise. * testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_base_of/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_base_of/value.cc: Likewise. * testsuite/20_util/is_class/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_class/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_class/value.cc: Likewise. * testsuite/20_util/is_const/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_const/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_const/value.cc: Likewise. * testsuite/20_util/is_empty/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_empty/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_empty/value.cc: Likewise. * testsuite/20_util/is_enum/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/is_enum/requirements/typedefs.cc * testsuite/20_util/is_enum/value.cc: Likewise. * testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc * testsuite/20_util/is_pointer/value.cc: Likewise. * testsuite/20_util/is_polymorphic/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/is_polymorphic/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_polymorphic/value.cc: Likewise. * testsuite/20_util/is_same/requirements/explicit_instantiation.cc * testsuite/20_util/is_same/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_same/value.cc: Likewise. * testsuite/20_util/is_union/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/is_union/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_union/value.cc: Likewise. * testsuite/20_util/is_void/requirements/explicit_instantiation.cc * testsuite/20_util/is_void/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_void/value.cc: Likewise. * testsuite/20_util/is_volatile/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/is_volatile/requirements/typedefs.cc: Likewise. * testsuite/20_util/is_volatile/value.cc: Likewise. * testsuite/20_util/rank/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/rank/requirements/typedefs.cc: Likewise. * testsuite/20_util/rank/value.cc: Likewise. * testsuite/20_util/remove_all_extents/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_all_extents/value.cc: Likewise. * testsuite/20_util/remove_const/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_const/value.cc: Likewise. * testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_cv/value.cc: Likewise. * testsuite/20_util/remove_extent/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_extent/value.cc: Likewise. * testsuite/20_util/remove_pointer/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_pointer/value.cc: Likewise. * testsuite/20_util/remove_volatile/requirements/ explicit_instantiation.cc: Likewise. * testsuite/20_util/remove_volatile/value.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205789 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 102 +++++++++++++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ libstdc++-v3/testsuite/20_util/add_const/value.cc | 48 ++++++++++ .../add_cv/requirements/explicit_instantiation.cc | 29 ++++++ libstdc++-v3/testsuite/20_util/add_cv/value.cc | 49 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/add_pointer/value.cc | 37 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/add_volatile/value.cc | 49 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/alignment_of/requirements/typedefs.cc | 34 +++++++ .../testsuite/20_util/alignment_of/value.cc | 36 ++++++++ .../extent/requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/extent/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/extent/value.cc | 47 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../requirements/typedefs.cc | 34 +++++++ .../20_util/has_virtual_destructor/value.cc | 50 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_abstract/requirements/typedefs.cc | 34 +++++++ .../testsuite/20_util/is_abstract/value.cc | 39 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_arithmetic/requirements/typedefs.cc | 34 +++++++ .../testsuite/20_util/is_arithmetic/value.cc | 51 +++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_array/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_array/value.cc | 44 +++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_base_of/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_base_of/value.cc | 89 ++++++++++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_class/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_class/value.cc | 51 +++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_const/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_const/value.cc | 40 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_empty/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_empty/value.cc | 66 +++++++++++++ .../is_enum/requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_enum/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_enum/value.cc | 49 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ libstdc++-v3/testsuite/20_util/is_pointer/value.cc | 35 +++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../is_polymorphic/requirements/typedefs.cc | 34 +++++++ .../testsuite/20_util/is_polymorphic/value.cc | 46 ++++++++++ .../is_same/requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_same/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_same/value.cc | 40 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_union/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_union/value.cc | 51 +++++++++++ .../is_void/requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_void/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/is_void/value.cc | 51 +++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/is_volatile/requirements/typedefs.cc | 34 +++++++ .../testsuite/20_util/is_volatile/value.cc | 40 ++++++++ .../rank/requirements/explicit_instantiation.cc | 29 ++++++ .../20_util/rank/requirements/typedefs.cc | 34 +++++++ libstdc++-v3/testsuite/20_util/rank/value.cc | 37 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/remove_all_extents/value.cc | 46 ++++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/remove_const/value.cc | 37 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ libstdc++-v3/testsuite/20_util/remove_cv/value.cc | 37 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/remove_extent/value.cc | 45 +++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/remove_pointer/value.cc | 38 ++++++++ .../requirements/explicit_instantiation.cc | 29 ++++++ .../testsuite/20_util/remove_volatile/value.cc | 38 ++++++++ 74 files changed, 2778 insertions(+) create mode 100644 libstdc++-v3/testsuite/20_util/add_const/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_const/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_cv/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_cv/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_pointer/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_volatile/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/add_volatile/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/alignment_of/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/alignment_of/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/alignment_of/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/extent/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/extent/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/extent/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/has_virtual_destructor/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_abstract/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_abstract/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_arithmetic/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_array/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_array/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_array/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_base_of/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_base_of/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_class/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_class/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_class/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_const/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_const/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_const/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_empty/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_empty/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_empty/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_enum/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_enum/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_enum/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_pointer/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_polymorphic/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_same/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_same/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_same/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_union/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_union/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_union/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_void/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_void/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_void/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_volatile/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_volatile/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/is_volatile/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/rank/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/rank/requirements/typedefs.cc create mode 100644 libstdc++-v3/testsuite/20_util/rank/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_all_extents/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_const/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_const/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_cv/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_extent/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_extent/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_pointer/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_pointer/value.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_volatile/requirements/explicit_instantiation.cc create mode 100644 libstdc++-v3/testsuite/20_util/remove_volatile/value.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e437e5eecbc..a814fd5855e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,105 @@ +2013-12-08 Paolo Carlini + + * testsuite/20_util/add_const/requirements/explicit_instantiation.cc: + New. + * testsuite/20_util/add_const/value.cc: Likewise. + * testsuite/20_util/add_cv/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/add_cv/value.cc: Likewise. + * testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/add_pointer/value.cc: Likewise. + * testsuite/20_util/add_volatile/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/add_volatile/value.cc: Likewise. + * testsuite/20_util/alignment_of/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/alignment_of/requirements/typedefs.cc: Likewise. + * testsuite/20_util/alignment_of/value.cc: Likewise. + * testsuite/20_util/extent/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/extent/requirements/typedefs.cc: Likewise. + * testsuite/20_util/extent/value.cc: Likewise. + * testsuite/20_util/has_virtual_destructor/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/has_virtual_destructor/requirements/ + typedefs.cc: Likewise. + * testsuite/20_util/has_virtual_destructor/value.cc: Likewise. + * testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_abstract/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_abstract/value.cc: Likewise. + * testsuite/20_util/is_arithmetic/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/is_arithmetic/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_arithmetic/value.cc: Likewise. + * testsuite/20_util/is_array/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_array/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_array/value.cc: Likewise. + * testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_base_of/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_base_of/value.cc: Likewise. + * testsuite/20_util/is_class/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_class/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_class/value.cc: Likewise. + * testsuite/20_util/is_const/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_const/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_const/value.cc: Likewise. + * testsuite/20_util/is_empty/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_empty/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_empty/value.cc: Likewise. + * testsuite/20_util/is_enum/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/is_enum/requirements/typedefs.cc + * testsuite/20_util/is_enum/value.cc: Likewise. + * testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc + * testsuite/20_util/is_pointer/value.cc: Likewise. + * testsuite/20_util/is_polymorphic/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/is_polymorphic/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_polymorphic/value.cc: Likewise. + * testsuite/20_util/is_same/requirements/explicit_instantiation.cc + * testsuite/20_util/is_same/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_same/value.cc: Likewise. + * testsuite/20_util/is_union/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/is_union/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_union/value.cc: Likewise. + * testsuite/20_util/is_void/requirements/explicit_instantiation.cc + * testsuite/20_util/is_void/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_void/value.cc: Likewise. + * testsuite/20_util/is_volatile/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/is_volatile/requirements/typedefs.cc: Likewise. + * testsuite/20_util/is_volatile/value.cc: Likewise. + * testsuite/20_util/rank/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/rank/requirements/typedefs.cc: Likewise. + * testsuite/20_util/rank/value.cc: Likewise. + * testsuite/20_util/remove_all_extents/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/remove_all_extents/value.cc: Likewise. + * testsuite/20_util/remove_const/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/remove_const/value.cc: Likewise. + * testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc: + Likewise. + * testsuite/20_util/remove_cv/value.cc: Likewise. + * testsuite/20_util/remove_extent/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/remove_extent/value.cc: Likewise. + * testsuite/20_util/remove_pointer/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/remove_pointer/value.cc: Likewise. + * testsuite/20_util/remove_volatile/requirements/ + explicit_instantiation.cc: Likewise. + * testsuite/20_util/remove_volatile/value.cc: Likewise. + 2013-12-06 Paolo Carlini * testsuite/util/testsuite_tr1.h (test_category, test_property, diff --git a/libstdc++-v3/testsuite/20_util/add_const/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/add_const/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..815008a396a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_const/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct add_const; +} diff --git a/libstdc++-v3/testsuite/20_util/add_const/value.cc b/libstdc++-v3/testsuite/20_util/add_const/value.cc new file mode 100644 index 00000000000..d300e4c8908 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_const/value.cc @@ -0,0 +1,48 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::add_const; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, const int>::value, ""); + static_assert(is_same::type, + const volatile int>::value, ""); + static_assert(is_same::type, int* const>::value, ""); + static_assert(is_same::type, int&>::value, ""); + static_assert(is_same::type, int (int)>::value, ""); + static_assert(is_same::type, const int>::value, ""); + static_assert(is_same::type, + const ClassType>::value, ""); + static_assert(is_same::type, + const volatile ClassType>::value, ""); + static_assert(is_same::type, + ClassType* const>::value, ""); + static_assert(is_same::type, ClassType&>::value, ""); + static_assert(is_same::type, + ClassType (ClassType)>::value, ""); + static_assert(is_same::type, + const ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/add_cv/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/add_cv/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1eaeeb75fb2 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_cv/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct add_cv; +} diff --git a/libstdc++-v3/testsuite/20_util/add_cv/value.cc b/libstdc++-v3/testsuite/20_util/add_cv/value.cc new file mode 100644 index 00000000000..c36f13c4849 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_cv/value.cc @@ -0,0 +1,49 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::add_cv; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, const volatile int>::value, ""); + static_assert(is_same::type, + const volatile int>::value, ""); + static_assert(is_same::type, int* const volatile>::value, ""); + static_assert(is_same::type, int&>::value, ""); + static_assert(is_same::type, int (int)>::value, ""); + static_assert(is_same::type, + const volatile int>::value, ""); + static_assert(is_same::type, + const volatile ClassType>::value, ""); + static_assert(is_same::type, + const volatile ClassType>::value, ""); + static_assert(is_same::type, + ClassType* const volatile>::value, ""); + static_assert(is_same::type, ClassType&>::value, ""); + static_assert(is_same::type, + ClassType (ClassType)>::value, ""); + static_assert(is_same::type, + const volatile ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..68a8cafce4a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_pointer/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct add_pointer; +} diff --git a/libstdc++-v3/testsuite/20_util/add_pointer/value.cc b/libstdc++-v3/testsuite/20_util/add_pointer/value.cc new file mode 100644 index 00000000000..de43d6bc269 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_pointer/value.cc @@ -0,0 +1,37 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::add_pointer; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, int*>::value, ""); + static_assert(is_same::type, int**>::value, ""); + static_assert(is_same::type, const int*>::value, ""); + static_assert(is_same::type, int*>::value, ""); + static_assert(is_same::type, + ClassType**>::value, ""); + static_assert(is_same::type, ClassType*>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/add_volatile/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/add_volatile/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..cfc657ca5db --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_volatile/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct add_volatile; +} diff --git a/libstdc++-v3/testsuite/20_util/add_volatile/value.cc b/libstdc++-v3/testsuite/20_util/add_volatile/value.cc new file mode 100644 index 00000000000..b78b14eaa81 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_volatile/value.cc @@ -0,0 +1,49 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::add_volatile; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, volatile int>::value, ""); + static_assert(is_same::type, + const volatile int>::value, ""); + static_assert(is_same::type, int* volatile>::value, ""); + static_assert(is_same::type, int&>::value, ""); + static_assert(is_same::type, int (int)>::value, ""); + static_assert(is_same::type, + volatile int>::value, ""); + static_assert(is_same::type, + volatile ClassType>::value, ""); + static_assert(is_same::type, + const volatile ClassType>::value, ""); + static_assert(is_same::type, + ClassType* volatile>::value, ""); + static_assert(is_same::type, ClassType&>::value, ""); + static_assert(is_same::type, + ClassType (ClassType)>::value, ""); + static_assert(is_same::type, + volatile ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/alignment_of/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/alignment_of/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..0cee459a4cb --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/alignment_of/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct alignment_of; +} diff --git a/libstdc++-v3/testsuite/20_util/alignment_of/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/alignment_of/requirements/typedefs.cc new file mode 100644 index 00000000000..e47147191c1 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/alignment_of/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::alignment_of test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/alignment_of/value.cc b/libstdc++-v3/testsuite/20_util/alignment_of/value.cc new file mode 100644 index 00000000000..29b8719daa8 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/alignment_of/value.cc @@ -0,0 +1,36 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::alignment_of; + using namespace __gnu_test; + + static_assert(test_property(__alignof__(char)), ""); + static_assert(test_property(__alignof__(short)), ""); + static_assert(test_property(__alignof__(int)), ""); + static_assert(test_property(__alignof__(double)), ""); + static_assert(test_property(__alignof__(int[4])), ""); + static_assert(test_property(__alignof__(ClassType)), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/extent/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/extent/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..dddbfbe7f8b --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/extent/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct extent; +} diff --git a/libstdc++-v3/testsuite/20_util/extent/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/extent/requirements/typedefs.cc new file mode 100644 index 00000000000..c59c66b876e --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/extent/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::extent test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/extent/value.cc b/libstdc++-v3/testsuite/20_util/extent/value.cc new file mode 100644 index 00000000000..1f1c0dd21ff --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/extent/value.cc @@ -0,0 +1,47 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::extent; + using namespace __gnu_test; + + static_assert(test_property(0), ""); + static_assert(test_property(2), ""); + static_assert(test_property(2), ""); + static_assert(test_property(0), ""); + static_assert(extent::value == 0, ""); + static_assert(extent::value == 0, ""); + static_assert(extent::value == 4, ""); + static_assert(extent::value == 4, ""); + static_assert(extent::value == 12, ""); + static_assert(test_property(0), ""); + static_assert(test_property(2), ""); + static_assert(test_property(2), ""); + static_assert(test_property(0), ""); + static_assert(extent::value == 0, ""); + static_assert(extent::value == 0, ""); + static_assert(extent::value == 4, ""); + static_assert(extent::value == 4, ""); + static_assert(extent::value == 12, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..af5871fe8bf --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct has_virtual_destructor; +} diff --git a/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/typedefs.cc new file mode 100644 index 00000000000..1e4bd32746b --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::has_virtual_destructor test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/has_virtual_destructor/value.cc b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/value.cc new file mode 100644 index 00000000000..7ab6a5d5b3a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/has_virtual_destructor/value.cc @@ -0,0 +1,50 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include +#include + +void test01() +{ + using std::has_virtual_destructor; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..5a7a766e895 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_abstract/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_abstract; +} diff --git a/libstdc++-v3/testsuite/20_util/is_abstract/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_abstract/requirements/typedefs.cc new file mode 100644 index 00000000000..3c753240cad --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_abstract/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_abstract test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_abstract/value.cc b/libstdc++-v3/testsuite/20_util/is_abstract/value.cc new file mode 100644 index 00000000000..8f01419fb89 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_abstract/value.cc @@ -0,0 +1,39 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_abstract; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..c9642c89444 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_arithmetic; +} diff --git a/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/typedefs.cc new file mode 100644 index 00000000000..308669452ea --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_arithmetic/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_arithmetic test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_arithmetic/value.cc b/libstdc++-v3/testsuite/20_util/is_arithmetic/value.cc new file mode 100644 index 00000000000..5150882040a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_arithmetic/value.cc @@ -0,0 +1,51 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_arithmetic; + using namespace __gnu_test; + + static_assert(test_category(false), ""); + + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); +#ifdef _GLIBCXX_USE_WCHAR_T + static_assert(test_category(true), ""); +#endif + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_array/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_array/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1ae681fe4fa --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_array/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_array; +} diff --git a/libstdc++-v3/testsuite/20_util/is_array/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_array/requirements/typedefs.cc new file mode 100644 index 00000000000..b9fcb85bfc0 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_array/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_array test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_array/value.cc b/libstdc++-v3/testsuite/20_util/is_array/value.cc new file mode 100644 index 00000000000..a8e336d3773 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_array/value.cc @@ -0,0 +1,44 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_array; + using namespace __gnu_test; + + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1564e0aa559 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_base_of/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_base_of; +} diff --git a/libstdc++-v3/testsuite/20_util/is_base_of/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_base_of/requirements/typedefs.cc new file mode 100644 index 00000000000..d39b007ed94 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_base_of/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_base_of test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_base_of/value.cc b/libstdc++-v3/testsuite/20_util/is_base_of/value.cc new file mode 100644 index 00000000000..cacee4c5dee --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_base_of/value.cc @@ -0,0 +1,89 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +class HiddenCons +{ + HiddenCons(); + HiddenCons(const HiddenCons&); +}; + +class DerivedHiddenCons +: private HiddenCons +{ + DerivedHiddenCons(); + DerivedHiddenCons(const DerivedHiddenCons&); +}; + +class MultiDerivedHiddenCons +: private HiddenCons, private __gnu_test::ClassType +{ + MultiDerivedHiddenCons(); + MultiDerivedHiddenCons(const MultiDerivedHiddenCons&); +}; + +void test01() +{ + using std::is_base_of; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + + // Negative tests. + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_class/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_class/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..884f4872917 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_class/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_class; +} diff --git a/libstdc++-v3/testsuite/20_util/is_class/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_class/requirements/typedefs.cc new file mode 100644 index 00000000000..1cd8d9958cd --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_class/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_class test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_class/value.cc b/libstdc++-v3/testsuite/20_util/is_class/value.cc new file mode 100644 index 00000000000..d3a4add7910 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_class/value.cc @@ -0,0 +1,51 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_class; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_const/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_const/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..c5ee5425f61 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_const/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_const; +} diff --git a/libstdc++-v3/testsuite/20_util/is_const/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_const/requirements/typedefs.cc new file mode 100644 index 00000000000..6a5d3bf01ec --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_const/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_const test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_const/value.cc b/libstdc++-v3/testsuite/20_util/is_const/value.cc new file mode 100644 index 00000000000..82f18e0a65a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_const/value.cc @@ -0,0 +1,40 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_const; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + + // Negative tests. + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_empty/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_empty/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..75aff62eac5 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_empty/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_empty; +} diff --git a/libstdc++-v3/testsuite/20_util/is_empty/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_empty/requirements/typedefs.cc new file mode 100644 index 00000000000..d7102ebe864 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_empty/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_empty test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_empty/value.cc b/libstdc++-v3/testsuite/20_util/is_empty/value.cc new file mode 100644 index 00000000000..3334bd527fd --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_empty/value.cc @@ -0,0 +1,66 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +class EmptyClassOne +{ typedef int type; }; + +class EmptyClassTwo +{ static int data; }; + +class EmptyClassThree +{ int f(); }; + +class NonEmptyClassOne +{ int data; }; + +class NonEmptyClassTwo +{ + virtual int f(); + virtual ~NonEmptyClassTwo(); +}; + +void test01() +{ + using std::is_empty; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_enum/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_enum/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..f467bc263b7 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_enum/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_enum; +} diff --git a/libstdc++-v3/testsuite/20_util/is_enum/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_enum/requirements/typedefs.cc new file mode 100644 index 00000000000..6c18666657f --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_enum/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_enum test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_enum/value.cc b/libstdc++-v3/testsuite/20_util/is_enum/value.cc new file mode 100644 index 00000000000..c418f7640d1 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_enum/value.cc @@ -0,0 +1,49 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_enum; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + + static_assert(test_category(false), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..109b0381523 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_pointer/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_pointer; +} diff --git a/libstdc++-v3/testsuite/20_util/is_pointer/value.cc b/libstdc++-v3/testsuite/20_util/is_pointer/value.cc new file mode 100644 index 00000000000..f2115183af8 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_pointer/value.cc @@ -0,0 +1,35 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_pointer; + using namespace __gnu_test; + + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..fd214359429 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_polymorphic; +} diff --git a/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/typedefs.cc new file mode 100644 index 00000000000..1a35c52d1be --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_polymorphic/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_polymorphic test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_polymorphic/value.cc b/libstdc++-v3/testsuite/20_util/is_polymorphic/value.cc new file mode 100644 index 00000000000..9a7a5e366c7 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_polymorphic/value.cc @@ -0,0 +1,46 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include +#include + +void test01() +{ + using std::is_polymorphic; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_same/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_same/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..5f46875e0cd --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_same/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_same; +} diff --git a/libstdc++-v3/testsuite/20_util/is_same/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_same/requirements/typedefs.cc new file mode 100644 index 00000000000..b035cf8900c --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_same/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_same test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_same/value.cc b/libstdc++-v3/testsuite/20_util/is_same/value.cc new file mode 100644 index 00000000000..3a46f292b82 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_same/value.cc @@ -0,0 +1,40 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_same; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + static_assert(test_relationship(true), ""); + + // Negative tests. + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); + static_assert(test_relationship(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_union/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_union/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1786bf7bceb --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_union/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_union; +} diff --git a/libstdc++-v3/testsuite/20_util/is_union/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_union/requirements/typedefs.cc new file mode 100644 index 00000000000..3b574c4f283 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_union/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_union test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_union/value.cc b/libstdc++-v3/testsuite/20_util/is_union/value.cc new file mode 100644 index 00000000000..b8a3835e511 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_union/value.cc @@ -0,0 +1,51 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_union; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_category(true), ""); + + // Negative tests. + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_void/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_void/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..7823bb29dc8 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_void/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_void; +} diff --git a/libstdc++-v3/testsuite/20_util/is_void/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_void/requirements/typedefs.cc new file mode 100644 index 00000000000..6242d5e8a81 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_void/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_void test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_void/value.cc b/libstdc++-v3/testsuite/20_util/is_void/value.cc new file mode 100644 index 00000000000..d8ea2511d70 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_void/value.cc @@ -0,0 +1,51 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_void; + using namespace __gnu_test; + + static_assert(test_category(true), ""); + + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); +#ifdef _GLIBCXX_USE_WCHAR_T + static_assert(test_category(false), ""); +#endif + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + static_assert(test_category(false), ""); + + // Sanity check. + static_assert(test_category(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/is_volatile/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/is_volatile/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..94c4784bfa3 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_volatile/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct is_volatile; +} diff --git a/libstdc++-v3/testsuite/20_util/is_volatile/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/is_volatile/requirements/typedefs.cc new file mode 100644 index 00000000000..45abc85b4a9 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_volatile/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::is_volatile test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/is_volatile/value.cc b/libstdc++-v3/testsuite/20_util/is_volatile/value.cc new file mode 100644 index 00000000000..6f7a8d343c4 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/is_volatile/value.cc @@ -0,0 +1,40 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::is_volatile; + using namespace __gnu_test; + + // Positive tests. + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + static_assert(test_property(true), ""); + + // Negative tests. + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); + static_assert(test_property(false), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/rank/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/rank/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..6c895c08411 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/rank/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct rank; +} diff --git a/libstdc++-v3/testsuite/20_util/rank/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/rank/requirements/typedefs.cc new file mode 100644 index 00000000000..e1015bd1b61 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/rank/requirements/typedefs.cc @@ -0,0 +1,34 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +void test01() +{ + // Check for required typedefs + typedef std::rank test_type; + typedef test_type::value_type value_type; + typedef test_type::type type; + typedef test_type::type::value_type type_value_type; + typedef test_type::type::type type_type; +} diff --git a/libstdc++-v3/testsuite/20_util/rank/value.cc b/libstdc++-v3/testsuite/20_util/rank/value.cc new file mode 100644 index 00000000000..de27bb87575 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/rank/value.cc @@ -0,0 +1,37 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::rank; + using namespace __gnu_test; + + static_assert(test_property(0), ""); + static_assert(test_property(1), ""); + static_assert(test_property(2), ""); + static_assert(test_property(6), ""); + static_assert(test_property(0), ""); + static_assert(test_property(1), ""); + static_assert(test_property(2), ""); + static_assert(test_property(6), ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..7a01f47e0f6 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_all_extents; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_all_extents/value.cc b/libstdc++-v3/testsuite/20_util/remove_all_extents/value.cc new file mode 100644 index 00000000000..6de63856eac --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_all_extents/value.cc @@ -0,0 +1,46 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_all_extents; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, + const int>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + const ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_const/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_const/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..5974a5634b9 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_const/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_const; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_const/value.cc b/libstdc++-v3/testsuite/20_util/remove_const/value.cc new file mode 100644 index 00000000000..dfc8edf8a36 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_const/value.cc @@ -0,0 +1,37 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_const; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, + volatile int>::value, ""); + static_assert(is_same::type, const int*>::value, ""); + static_assert(is_same::type, + volatile ClassType>::value, ""); + static_assert(is_same::type, + const ClassType*>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..3ef3f1fbdc9 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_cv/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_cv; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_cv/value.cc b/libstdc++-v3/testsuite/20_util/remove_cv/value.cc new file mode 100644 index 00000000000..b1c59b8d748 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_cv/value.cc @@ -0,0 +1,37 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_cv; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, + const volatile int*>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + const volatile ClassType*>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_extent/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_extent/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..0097100a139 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_extent/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_extent; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_extent/value.cc b/libstdc++-v3/testsuite/20_util/remove_extent/value.cc new file mode 100644 index 00000000000..ddbbd6af02d --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_extent/value.cc @@ -0,0 +1,45 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_extent; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int[3]>::value, ""); + static_assert(is_same::type, int[3]>::value, ""); + static_assert(is_same::type, + const int>::value, ""); + static_assert(is_same::type, ClassType>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, + ClassType[3]>::value, ""); + static_assert(is_same::type, + ClassType[3]>::value, ""); + static_assert(is_same::type, + const ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1cac9852645 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_pointer; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_pointer/value.cc b/libstdc++-v3/testsuite/20_util/remove_pointer/value.cc new file mode 100644 index 00000000000..a032811835e --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_pointer/value.cc @@ -0,0 +1,38 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_pointer; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, int>::value, ""); + static_assert(is_same::type, + const int>::value, ""); + static_assert(is_same::type, int*>::value, ""); + static_assert(is_same::type, + ClassType>::value, ""); + static_assert(is_same::type, ClassType>::value, ""); +} diff --git a/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/explicit_instantiation.cc b/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/explicit_instantiation.cc new file mode 100644 index 00000000000..1f39beca364 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/explicit_instantiation.cc @@ -0,0 +1,29 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +namespace std +{ + typedef short test_type; + template struct remove_volatile; +} diff --git a/libstdc++-v3/testsuite/20_util/remove_volatile/value.cc b/libstdc++-v3/testsuite/20_util/remove_volatile/value.cc new file mode 100644 index 00000000000..9a582968334 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_volatile/value.cc @@ -0,0 +1,38 @@ +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +// Copyright (C) 2013 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 +// . + +#include +#include + +void test01() +{ + using std::remove_volatile; + using std::is_same; + using namespace __gnu_test; + + static_assert(is_same::type, + const int>::value, ""); + static_assert(is_same::type, + volatile int*>::value, ""); + static_assert(is_same::type, + const ClassType>::value, ""); + static_assert(is_same::type, + volatile ClassType*>::value, ""); +} -- 2.11.4.GIT