From: Paolo Carlini Date: Tue, 14 Oct 2014 08:45:38 +0000 (+0000) Subject: typedefs.cc: Rename to alias_decl.cc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=181e03688088ba1c2ce2762b05cd55a42188820f;p=gcc.git typedefs.cc: Rename to alias_decl.cc. 2014-10-14 Paolo Carlini * testsuite/20_util/add_lvalue_reference/requirements/typedefs.cc: Rename to alias_decl.cc. * testsuite/20_util/add_rvalue_reference/requirements/typedefs.cc: Likewise. * testsuite/20_util/common_type/requirements/typedefs-3.cc: Likewise. * testsuite/20_util/conditional/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/decay/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/enable_if/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Likewise. * testsuite/20_util/remove_reference/requirements/typedefs.cc: Likewise. * testsuite/20_util/result_of/requirements/typedefs.cc: Likewise. * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: Likewise. From-SVN: r216188 --- diff --git a/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/alias_decl.cc new file mode 100644 index 00000000000..b1685442f10 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/alias_decl.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +using namespace std; + +static_assert( is_same::type, + add_lvalue_reference_t>(), + "add_lvalue_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/typedefs.cc deleted file mode 100644 index b1685442f10..00000000000 --- a/libstdc++-v3/testsuite/20_util/add_lvalue_reference/requirements/typedefs.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - - -// NB: This file is for testing type_traits with NO OTHER INCLUDES. - -#include - -using namespace std; - -static_assert( is_same::type, - add_lvalue_reference_t>(), - "add_lvalue_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc new file mode 100644 index 00000000000..ac1ecef8885 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +using namespace std; + +static_assert( is_same::type, + add_rvalue_reference_t>(), + "add_rvalue_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/typedefs.cc deleted file mode 100644 index ac1ecef8885..00000000000 --- a/libstdc++-v3/testsuite/20_util/add_rvalue_reference/requirements/typedefs.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - - -// NB: This file is for testing type_traits with NO OTHER INCLUDES. - -#include - -using namespace std; - -static_assert( is_same::type, - add_rvalue_reference_t>(), - "add_rvalue_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/common_type/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/common_type/requirements/alias_decl.cc new file mode 100644 index 00000000000..63f594501a9 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/common_type/requirements/alias_decl.cc @@ -0,0 +1,27 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } +// +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +static_assert( is_same::type, + common_type_t>(), + "common_type_t" ); diff --git a/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-3.cc b/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-3.cc deleted file mode 100644 index 63f594501a9..00000000000 --- a/libstdc++-v3/testsuite/20_util/common_type/requirements/typedefs-3.cc +++ /dev/null @@ -1,27 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } -// -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -static_assert( is_same::type, - common_type_t>(), - "common_type_t" ); diff --git a/libstdc++-v3/testsuite/20_util/conditional/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/conditional/requirements/alias_decl.cc new file mode 100644 index 00000000000..a64538b3d24 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/conditional/requirements/alias_decl.cc @@ -0,0 +1,33 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + + +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +using namespace std; + +static_assert( is_same::type, + conditional_t>(), + "conditional_t" ); +static_assert( is_same::type, + conditional_t>(), + "conditional_t" ); diff --git a/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs-2.cc deleted file mode 100644 index a64538b3d24..00000000000 --- a/libstdc++-v3/testsuite/20_util/conditional/requirements/typedefs-2.cc +++ /dev/null @@ -1,33 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - - -// NB: This file is for testing type_traits with NO OTHER INCLUDES. - -#include - -using namespace std; - -static_assert( is_same::type, - conditional_t>(), - "conditional_t" ); -static_assert( is_same::type, - conditional_t>(), - "conditional_t" ); diff --git a/libstdc++-v3/testsuite/20_util/decay/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/decay/requirements/alias_decl.cc new file mode 100644 index 00000000000..468ba814bd2 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/decay/requirements/alias_decl.cc @@ -0,0 +1,35 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +template + using test = is_same; + +static_assert( test, decay_t>(), "decay" ); +static_assert( test, decay_t>(), + "decay" ); +static_assert( test, decay_t>(), "decay" ); +typedef void (fn_type) (); +static_assert( test, decay_t>(), "decay" ); +typedef void (cfn_type) () const; +static_assert( test, decay_t>(), "decay" ); diff --git a/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs-2.cc deleted file mode 100644 index 468ba814bd2..00000000000 --- a/libstdc++-v3/testsuite/20_util/decay/requirements/typedefs-2.cc +++ /dev/null @@ -1,35 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -template - using test = is_same; - -static_assert( test, decay_t>(), "decay" ); -static_assert( test, decay_t>(), - "decay" ); -static_assert( test, decay_t>(), "decay" ); -typedef void (fn_type) (); -static_assert( test, decay_t>(), "decay" ); -typedef void (cfn_type) () const; -static_assert( test, decay_t>(), "decay" ); diff --git a/libstdc++-v3/testsuite/20_util/enable_if/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/enable_if/requirements/alias_decl.cc new file mode 100644 index 00000000000..4c46da9914b --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/enable_if/requirements/alias_decl.cc @@ -0,0 +1,29 @@ +// { dg-do compile } +// { dg-options "-std=gnu++1y" } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +static_assert( is_same::type, enable_if_t>(), + "enable_if_t" ); +struct X; +static_assert( is_same::type, enable_if_t>(), + "enable_if_t" ); diff --git a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs-2.cc b/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs-2.cc deleted file mode 100644 index 4c46da9914b..00000000000 --- a/libstdc++-v3/testsuite/20_util/enable_if/requirements/typedefs-2.cc +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++1y" } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -static_assert( is_same::type, enable_if_t>(), - "enable_if_t" ); -struct X; -static_assert( is_same::type, enable_if_t>(), - "enable_if_t" ); diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/alias_decl.cc new file mode 100644 index 00000000000..16c7c90c59d --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/make_signed/requirements/alias_decl.cc @@ -0,0 +1,35 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +template + using test = is_same; + +static_assert( test, make_signed_t>(), + "make_signed_t" ); + +static_assert( test, make_signed_t>(), + "make_signed_t" ); + +static_assert( test, make_signed_t>(), + "make_signed_t" ); diff --git a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-3.cc b/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-3.cc deleted file mode 100644 index 16c7c90c59d..00000000000 --- a/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-3.cc +++ /dev/null @@ -1,35 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -template - using test = is_same; - -static_assert( test, make_signed_t>(), - "make_signed_t" ); - -static_assert( test, make_signed_t>(), - "make_signed_t" ); - -static_assert( test, make_signed_t>(), - "make_signed_t" ); diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/alias_decl.cc new file mode 100644 index 00000000000..5bdea5dc93f --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/alias_decl.cc @@ -0,0 +1,35 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +template + using test = is_same; + +static_assert( test, make_unsigned_t>(), + "make_unsigned_t" ); + +static_assert( test, make_unsigned_t>(), + "make_unsigned_t" ); + +static_assert( test, make_unsigned_t>(), + "make_unsigned_t" ); diff --git a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-3.cc b/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-3.cc deleted file mode 100644 index 5bdea5dc93f..00000000000 --- a/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs-3.cc +++ /dev/null @@ -1,35 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -template - using test = is_same; - -static_assert( test, make_unsigned_t>(), - "make_unsigned_t" ); - -static_assert( test, make_unsigned_t>(), - "make_unsigned_t" ); - -static_assert( test, make_unsigned_t>(), - "make_unsigned_t" ); diff --git a/libstdc++-v3/testsuite/20_util/remove_reference/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/remove_reference/requirements/alias_decl.cc new file mode 100644 index 00000000000..9c06e3b00c6 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/remove_reference/requirements/alias_decl.cc @@ -0,0 +1,30 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +static_assert( is_same::type, remove_reference_t>(), + "remove_reference_t" ); +static_assert( is_same::type, remove_reference_t>(), + "remove_reference_t" ); +static_assert( is_same::type, remove_reference_t>(), + "remove_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/remove_reference/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/remove_reference/requirements/typedefs.cc deleted file mode 100644 index 9c06e3b00c6..00000000000 --- a/libstdc++-v3/testsuite/20_util/remove_reference/requirements/typedefs.cc +++ /dev/null @@ -1,30 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -static_assert( is_same::type, remove_reference_t>(), - "remove_reference_t" ); -static_assert( is_same::type, remove_reference_t>(), - "remove_reference_t" ); -static_assert( is_same::type, remove_reference_t>(), - "remove_reference_t" ); diff --git a/libstdc++-v3/testsuite/20_util/result_of/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/result_of/requirements/alias_decl.cc new file mode 100644 index 00000000000..730a66d303c --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/result_of/requirements/alias_decl.cc @@ -0,0 +1,32 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } + +// Copyright (C) 2013-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 +// . + +#include + +using namespace std; + +using F1 = char(*)(char); +static_assert( is_same::type, result_of_t>(), + "result_of_t" ); + +struct X { }; +using F2 = int X::*; +static_assert( is_same::type, result_of_t>(), + "result_of_t" ); diff --git a/libstdc++-v3/testsuite/20_util/result_of/requirements/typedefs.cc b/libstdc++-v3/testsuite/20_util/result_of/requirements/typedefs.cc deleted file mode 100644 index 730a66d303c..00000000000 --- a/libstdc++-v3/testsuite/20_util/result_of/requirements/typedefs.cc +++ /dev/null @@ -1,32 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } - -// Copyright (C) 2013-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 -// . - -#include - -using namespace std; - -using F1 = char(*)(char); -static_assert( is_same::type, result_of_t>(), - "result_of_t" ); - -struct X { }; -using F2 = int X::*; -static_assert( is_same::type, result_of_t>(), - "result_of_t" ); diff --git a/libstdc++-v3/testsuite/20_util/underlying_type/requirements/alias_decl.cc b/libstdc++-v3/testsuite/20_util/underlying_type/requirements/alias_decl.cc new file mode 100644 index 00000000000..78090b7dd3c --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/underlying_type/requirements/alias_decl.cc @@ -0,0 +1,32 @@ +// { dg-options "-std=gnu++1y" } +// { dg-do compile } +// +// Copyright (C) 2013-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 +// . + +// +// NB: This file is for testing type_traits with NO OTHER INCLUDES. + +#include + +using namespace std; + +enum E : long { }; + +static_assert( is_same::type, + underlying_type_t>(), + "underlying_type_t" ); diff --git a/libstdc++-v3/testsuite/20_util/underlying_type/requirements/typedefs-3.cc b/libstdc++-v3/testsuite/20_util/underlying_type/requirements/typedefs-3.cc deleted file mode 100644 index 78090b7dd3c..00000000000 --- a/libstdc++-v3/testsuite/20_util/underlying_type/requirements/typedefs-3.cc +++ /dev/null @@ -1,32 +0,0 @@ -// { dg-options "-std=gnu++1y" } -// { dg-do compile } -// -// Copyright (C) 2013-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 -// . - -// -// NB: This file is for testing type_traits with NO OTHER INCLUDES. - -#include - -using namespace std; - -enum E : long { }; - -static_assert( is_same::type, - underlying_type_t>(), - "underlying_type_t" );