aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2014-10-15 09:26:05 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2014-10-15 09:26:05 +0000
commit11915f2ead8446ed5d3457717a5ce0a73eb406c4 (patch)
tree6f0ec227bf250c5f712349f72ba1c47441cb2119
parent6393e9d626ea2410a914e8374967e7ecc4e3a22b (diff)
downloadgcc-11915f2ead8446ed5d3457717a5ce0a73eb406c4.zip
gcc-11915f2ead8446ed5d3457717a5ce0a73eb406c4.tar.gz
gcc-11915f2ead8446ed5d3457717a5ce0a73eb406c4.tar.bz2
alias_decl.cc: New.
2014-10-15 Paolo Carlini <paolo.carlini@oracle.com> * testsuite/20_util/add_const/requirements/alias_decl.cc: New. * testsuite/20_util/add_cv/requirements/alias_decl.cc: Likewise. * testsuite/20_util/add_pointer/requirements/alias_decl.cc: Likewise. * testsuite/20_util/add_volatile/requirements/alias_decl.cc: Likewise. * testsuite/20_util/aligned_storage/requirements/alias_decl.cc: Likewise. * testsuite/20_util/aligned_union/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_all_extents/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_const/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_cv/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_extent/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_pointer/requirements/alias_decl.cc: Likewise. * testsuite/20_util/remove_volatile/requirements/alias_decl.cc: Likewise. From-SVN: r216245
-rw-r--r--libstdc++-v3/ChangeLog19
-rw-r--r--libstdc++-v3/testsuite/20_util/add_const/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/add_cv/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/add_pointer/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/add_volatile/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/aligned_storage/requirements/alias_decl.cc29
-rw-r--r--libstdc++-v3/testsuite/20_util/aligned_union/requirements/alias_decl.cc29
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_const/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_cv/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_extent/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_pointer/requirements/alias_decl.cc33
-rw-r--r--libstdc++-v3/testsuite/20_util/remove_volatile/requirements/alias_decl.cc33
13 files changed, 407 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2a05b97..71d4927 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,24 @@
2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
+ * testsuite/20_util/add_const/requirements/alias_decl.cc: New.
+ * testsuite/20_util/add_cv/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/add_pointer/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/add_volatile/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/aligned_storage/requirements/alias_decl.cc:
+ Likewise.
+ * testsuite/20_util/aligned_union/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/remove_all_extents/requirements/alias_decl.cc:
+ Likewise.
+ * testsuite/20_util/remove_const/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/remove_cv/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/remove_extent/requirements/alias_decl.cc: Likewise.
+ * testsuite/20_util/remove_pointer/requirements/alias_decl.cc:
+ Likewise.
+ * testsuite/20_util/remove_volatile/requirements/alias_decl.cc:
+ Likewise.
+
+2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
+
* include/std/limits: Remove stray spaces after backslash.
* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
line number.
diff --git a/libstdc++-v3/testsuite/20_util/add_const/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_const/requirements/alias_decl.cc
new file mode 100644
index 0000000..b900e4c
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/add_const/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename add_const<int>::type,
+ add_const_t<int>>(),
+ "add_const_t" );
+
+static_assert (is_same<typename add_const<const long>::type,
+ add_const_t<const long>>(),
+ "add_const_t" );
diff --git a/libstdc++-v3/testsuite/20_util/add_cv/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_cv/requirements/alias_decl.cc
new file mode 100644
index 0000000..ea54a67
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/add_cv/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename add_cv<int>::type,
+ add_cv_t<int>>(),
+ "add_cv_t" );
+
+static_assert (is_same<typename add_cv<const volatile long>::type,
+ add_cv_t<const volatile long>>(),
+ "add_cv_t" );
diff --git a/libstdc++-v3/testsuite/20_util/add_pointer/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_pointer/requirements/alias_decl.cc
new file mode 100644
index 0000000..ff4d589
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/add_pointer/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename add_pointer<int>::type,
+ add_pointer_t<int>>(),
+ "add_pointer_t" );
+
+static_assert (is_same<typename add_pointer<long*>::type,
+ add_pointer_t<long*>>(),
+ "add_pointer_t" );
diff --git a/libstdc++-v3/testsuite/20_util/add_volatile/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_volatile/requirements/alias_decl.cc
new file mode 100644
index 0000000..6eee2f6
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/add_volatile/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename add_volatile<int>::type,
+ add_volatile_t<int>>(),
+ "add_volatile_t" );
+
+static_assert (is_same<typename add_volatile<volatile long>::type,
+ add_volatile_t<volatile long>>(),
+ "add_volatile_t" );
diff --git a/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/alias_decl.cc
new file mode 100644
index 0000000..dc5ec5f
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/aligned_storage/requirements/alias_decl.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename aligned_storage<4>::type,
+ aligned_storage_t<4>>(),
+ "aligned_storage_t" );
diff --git a/libstdc++-v3/testsuite/20_util/aligned_union/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/aligned_union/requirements/alias_decl.cc
new file mode 100644
index 0000000..5e87468
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/aligned_union/requirements/alias_decl.cc
@@ -0,0 +1,29 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename aligned_union<0, char, int>::type,
+ aligned_union_t<0, char, int>>(),
+ "aligned_union_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/alias_decl.cc
new file mode 100644
index 0000000..d906720
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_all_extents/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_all_extents<int>::type,
+ remove_all_extents_t<int>>(),
+ "remove_all_extents_t" );
+
+static_assert (is_same<typename remove_all_extents<long[3][2]>::type,
+ remove_all_extents_t<long[3][2]>>(),
+ "remove_all_extents_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_const/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_const/requirements/alias_decl.cc
new file mode 100644
index 0000000..62df9ac
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_const/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_const<int>::type,
+ remove_const_t<int>>(),
+ "remove_const_t" );
+
+static_assert (is_same<typename remove_const<const long>::type,
+ remove_const_t<const long>>(),
+ "remove_const_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_cv/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_cv/requirements/alias_decl.cc
new file mode 100644
index 0000000..3841eab
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_cv/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_cv<int>::type,
+ remove_cv_t<int>>(),
+ "remove_cv_t" );
+
+static_assert (is_same<typename remove_cv<const volatile long>::type,
+ remove_cv_t<const volatile long>>(),
+ "remove_cv_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_extent/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_extent/requirements/alias_decl.cc
new file mode 100644
index 0000000..598c5cd
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_extent/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_extent<int>::type,
+ remove_extent_t<int>>(),
+ "remove_extent_t" );
+
+static_assert (is_same<typename remove_extent<long[3]>::type,
+ remove_extent_t<long[3]>>(),
+ "remove_extent_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/alias_decl.cc
new file mode 100644
index 0000000..0f2857b
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_pointer/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_pointer<int>::type,
+ remove_pointer_t<int>>(),
+ "remove_pointer_t" );
+
+static_assert (is_same<typename remove_pointer<long*>::type,
+ remove_pointer_t<long*>>(),
+ "remove_pointer_t" );
diff --git a/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/alias_decl.cc
new file mode 100644
index 0000000..c842cac
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/remove_volatile/requirements/alias_decl.cc
@@ -0,0 +1,33 @@
+// { dg-options "-std=gnu++1y" }
+// { dg-do compile }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// NB: This file is for testing type_traits with NO OTHER INCLUDES.
+
+#include <type_traits>
+
+using namespace std;
+
+static_assert (is_same<typename remove_volatile<int>::type,
+ remove_volatile_t<int>>(),
+ "remove_volatile_t" );
+
+static_assert (is_same<typename remove_volatile<volatile long>::type,
+ remove_volatile_t<volatile long>>(),
+ "remove_volatile_t" );