From ae29d0253f8333b228e24c6202f567ee9dca8da9 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 8 Dec 2013 09:44:48 +0000 Subject: [PATCH] explicit_instantiation.cc: New. 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. From-SVN: r205789 --- 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 e437e5e..a814fd5 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 0000000..815008a --- /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 0000000..d300e4c --- /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 0000000..1eaeeb7 --- /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 0000000..c36f13c --- /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 0000000..68a8caf --- /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 0000000..de43d6b --- /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 0000000..cfc657c --- /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 0000000..b78b14e --- /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 0000000..0cee459 --- /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 0000000..e471471 --- /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 0000000..29b8719 --- /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 0000000..dddbfbe7 --- /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 0000000..c59c66b --- /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 0000000..1f1c0dd --- /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 0000000..af5871f --- /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 0000000..1e4bd32 --- /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 0000000..7ab6a5d --- /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 0000000..5a7a766 --- /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 0000000..3c75324 --- /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 0000000..8f01419 --- /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 0000000..c9642c8 --- /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 0000000..3086694 --- /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 0000000..5150882 --- /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 0000000..1ae681f --- /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 0000000..b9fcb85 --- /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 0000000..a8e336d --- /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 0000000..1564e0a --- /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 0000000..d39b007 --- /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 0000000..cacee4c --- /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 0000000..884f487 --- /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 0000000..1cd8d99 --- /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 0000000..d3a4add --- /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 0000000..c5ee542 --- /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 0000000..6a5d3bf --- /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 0000000..82f18e0 --- /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 0000000..75aff62 --- /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 0000000..d7102eb --- /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 0000000..3334bd52 --- /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 0000000..f467bc2 --- /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 0000000..6c18666 --- /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 0000000..c418f76 --- /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 0000000..109b038 --- /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 0000000..f211518 --- /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 0000000..fd21435 --- /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 0000000..1a35c52 --- /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 0000000..9a7a5e3 --- /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 0000000..5f46875 --- /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 0000000..b035cf8 --- /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 0000000..3a46f29 --- /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 0000000..1786bf7 --- /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 0000000..3b574c4 --- /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 0000000..b8a3835 --- /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 0000000..7823bb2 --- /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 0000000..6242d5e --- /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 0000000..d8ea251 --- /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 0000000..94c4784 --- /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 0000000..45abc85 --- /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 0000000..6f7a8d3 --- /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 0000000..6c895c0 --- /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 0000000..e1015bd --- /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 0000000..de27bb8 --- /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 0000000..7a01f47 --- /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 0000000..6de6385 --- /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 0000000..5974a56 --- /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 0000000..dfc8edf --- /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 0000000..3ef3f1f --- /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 0000000..b1c59b8 --- /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 0000000..0097100 --- /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 0000000..ddbbd6a --- /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 0000000..1cac985 --- /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 0000000..a032811 --- /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 0000000..1f39bec --- /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 0000000..9a58296 --- /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.7.4