From: Edward Smith-Rowland <3dw4rd@verizon.net> Date: Tue, 10 Sep 2019 03:38:58 +0000 (+0000) Subject: Implement C++20 p1424 - 'constexpr' feature macro concerns... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b30ee71a406f6d14265cf5b92b0c650d1d9b5696;p=gcc.git Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p1424 - 'constexpr' feature macro concerns, Issue 3256 - Feature testing macro for constexpr algorithms, and Issue 3257 - Missing feature testing macro update from P0858. * include/std/version (__cpp_lib_constexpr_algorithms): Bump value. * include/bits/algorithmfwd.h: Ditto. * include/std/utility: Ditto. * testsuite/25_algorithms/constexpr_macro.cc: Ditto. * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for __cpp_lib_constexpr macro in . * testsuite/20_util/exchange/constexpr.cc: Add check for __cpp_lib_constexpr macro in . * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for __cpp_lib_constexpr_algorithms. * testsuite/25_algorithms/all_of/constexpr.cc: Ditto. * testsuite/25_algorithms/any_of/constexpr.cc: Ditto. * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto. * testsuite/25_algorithms/copy/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto. * testsuite/25_algorithms/count/constexpr.cc: Ditto. * testsuite/25_algorithms/count_if/constexpr.cc: Ditto. * testsuite/25_algorithms/equal/constexpr.cc: Ditto. * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto. * testsuite/25_algorithms/fill/constexpr.cc: Ditto. * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto. * testsuite/25_algorithms/find/constexpr.cc: Ditto. * testsuite/25_algorithms/find_end/constexpr.cc: Ditto. * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto. * testsuite/25_algorithms/find_if/constexpr.cc: Ditto. * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto. * testsuite/25_algorithms/for_each/constexpr.cc: Ditto. * testsuite/25_algorithms/generate/constexpr.cc: Ditto. * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto. * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto. * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto. * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto. * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto. * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto. * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto. * testsuite/25_algorithms/merge/constexpr.cc: Ditto. * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto. * testsuite/25_algorithms/none_of/constexpr.cc: Ditto. * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto. * testsuite/25_algorithms/remove/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto. * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto. * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/search/constexpr.cc: Ditto. * testsuite/25_algorithms/search_n/constexpr.cc: Ditto. * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto. * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto. * testsuite/25_algorithms/set_union/constexpr.cc: Ditto. * testsuite/25_algorithms/transform/constexpr.cc: Ditto. * testsuite/25_algorithms/unique/constexpr.cc: Ditto. * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto. * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto. From-SVN: r275560 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 982d63b6da3..7f3793409e2 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,72 @@ +2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> + + Implement C++20 p1424 - 'constexpr' feature macro concerns, + Issue 3256 - Feature testing macro for constexpr algorithms, + and Issue 3257 - Missing feature testing macro update from P0858. + * include/std/version (__cpp_lib_constexpr_algorithms): Bump value. + * include/bits/algorithmfwd.h: Ditto. + * include/std/utility: Ditto. + * testsuite/25_algorithms/constexpr_macro.cc: Ditto. + * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for + __cpp_lib_constexpr macro in . + * testsuite/20_util/exchange/constexpr.cc: Add check for + __cpp_lib_constexpr macro in . + * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for + __cpp_lib_constexpr_algorithms. + * testsuite/25_algorithms/all_of/constexpr.cc: Ditto. + * testsuite/25_algorithms/any_of/constexpr.cc: Ditto. + * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto. + * testsuite/25_algorithms/copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto. + * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto. + * testsuite/25_algorithms/count/constexpr.cc: Ditto. + * testsuite/25_algorithms/count_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/equal/constexpr.cc: Ditto. + * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto. + * testsuite/25_algorithms/fill/constexpr.cc: Ditto. + * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto. + * testsuite/25_algorithms/find/constexpr.cc: Ditto. + * testsuite/25_algorithms/find_end/constexpr.cc: Ditto. + * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto. + * testsuite/25_algorithms/find_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto. + * testsuite/25_algorithms/for_each/constexpr.cc: Ditto. + * testsuite/25_algorithms/generate/constexpr.cc: Ditto. + * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto. + * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto. + * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto. + * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto. + * testsuite/25_algorithms/merge/constexpr.cc: Ditto. + * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto. + * testsuite/25_algorithms/none_of/constexpr.cc: Ditto. + * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto. + * testsuite/25_algorithms/remove/constexpr.cc: Ditto. + * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto. + * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/search/constexpr.cc: Ditto. + * testsuite/25_algorithms/search_n/constexpr.cc: Ditto. + * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto. + * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto. + * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto. + * testsuite/25_algorithms/set_union/constexpr.cc: Ditto. + * testsuite/25_algorithms/transform/constexpr.cc: Ditto. + * testsuite/25_algorithms/unique/constexpr.cc: Ditto. + * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto. + * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto. + 2019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net> Update docs for recent and constexpr lib changes. diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index 9c511f05197..21b58eba2dd 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -192,8 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // adjacent_find #if __cplusplus > 201703L -# define __cpp_lib_constexpr_algorithms 201711L -# define __cpp_lib_constexpr_swap_algorithms 201806L +# define __cpp_lib_constexpr_algorithms 201806L #endif #if __cplusplus >= 201103L diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index e29775a42c5..420fea687b5 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -70,7 +70,7 @@ #endif #if __cplusplus > 201402L -# define __cpp_lib_array_constexpr 201603 +# define __cpp_lib_array_constexpr 201803 #endif namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view index e8b6ed3af12..ff1c0c3f36f 100644 --- a/libstdc++-v3/include/std/string_view +++ b/libstdc++-v3/include/std/string_view @@ -47,7 +47,7 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#define __cpp_lib_string_view 201603 +#define __cpp_lib_string_view 201803 // Helper for basic_string and basic_string_view members. constexpr size_t diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index 5f496f68ded..246e3a3b247 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -281,7 +281,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_exchange_function 201304 #if __cplusplus > 201703L -# define __cpp_lib_constexpr_algorithms 201711L +# define __cpp_lib_constexpr_algorithms 201806L #endif /// Assign @p __new_val to @p __obj and return its previous value. diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 7625d397a0d..f758bcd4301 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -90,7 +90,7 @@ #define __cpp_lib_addressof_constexpr 201603 #define __cpp_lib_any 201606L #define __cpp_lib_apply 201603 -#define __cpp_lib_array_constexpr 201603 +#define __cpp_lib_array_constexpr 201803 #define __cpp_lib_as_const 201510 #define __cpp_lib_atomic_is_always_lock_free 201603 #define __cpp_lib_bool_constant 201505 @@ -138,7 +138,7 @@ # define __cpp_lib_shared_mutex 201505 #endif #define __cpp_lib_shared_ptr_weak_type 201606 -#define __cpp_lib_string_view 201603 +#define __cpp_lib_string_view 201803 // #define __cpp_lib_to_chars 201611L #define __cpp_lib_type_trait_variable_templates 201510L #define __cpp_lib_uncaught_exceptions 201411L @@ -153,8 +153,8 @@ #define __cpp_lib_atomic_ref 201806L #define __cpp_lib_bind_front 201907L #define __cpp_lib_bounded_array_traits 201902L -#define __cpp_lib_constexpr_algorithms 201711L -#define __cpp_lib_constexpr_swap_algorithms 201806L +#define __cpp_lib_constexpr 201711L +#define __cpp_lib_constexpr_algorithms 201806L #if __cpp_impl_destroying_delete # define __cpp_lib_destroying_delete 201806L #endif diff --git a/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc b/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc index 38edfaadec2..9c84134f987 100644 --- a/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc +++ b/libstdc++-v3/testsuite/20_util/exchange/constexpr.cc @@ -20,6 +20,12 @@ #include +#ifndef __cpp_lib_constexpr_algorithms +# error "Feature-test macro for constexpr algorithms missing" +#elif __cpp_lib_constexpr_algorithms < 201806L +# error "Feature-test macro for constexpr algorithms has wrong value" +#endif + constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc index e62f43cc325..bcfd8060035 100644 --- a/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/adjacent_find/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array car{{0, 1, 2, 3, 4, 5, 6, 6, 8, 9, 9, 11}}; constexpr auto out0x = std::adjacent_find(car.begin(), car.end()); diff --git a/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc index e3d187ca390..7f62bbbc8c0 100644 --- a/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/all_of/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array cae{{0, 2, 4, 6, 8, 10}}; constexpr auto out2 = std::all_of(cae.begin(), cae.end(), diff --git a/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc index 0ff427cbc82..a1e64e82bf1 100644 --- a/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/any_of/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc index aaa411275aa..8406b3d147f 100644 --- a/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/binary_search/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc b/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc index 07808eed042..cff27695b13 100644 --- a/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc +++ b/libstdc++-v3/testsuite/25_algorithms/constexpr_macro.cc @@ -22,6 +22,6 @@ #ifndef __cpp_lib_constexpr_algorithms # error "Feature-test macro for constexpr algorithms missing in " -#elif __cpp_lib_constexpr_algorithms != 201711L +#elif __cpp_lib_constexpr_algorithms < 201806L # error "Feature-test macro for constexpr algorithms has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc index 9a4aa25bb7a..67910b8773e 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc index 25cf97f62d7..ed7487905a8 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy_backward/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc index 59deacfbbcc..ef2de8c996c 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc index 72bc1e6e3f6..3711281e6b2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool diff --git a/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc index d7cd56de04c..144a83dbd2c 100644 --- a/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/count/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc index 2a1c7d002ee..63f7a739cd3 100644 --- a/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/count_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto out9 = std::count_if(ca0.begin(), ca0.end(), diff --git a/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc new file mode 100644 index 00000000000..a195a452881 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/cpp_lib_constexpr.cc @@ -0,0 +1,27 @@ +// Copyright (C) 2019 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 +// . + +// { dg-options "-std=gnu++2a" } +// { dg-do compile { target c++2a } } + +#include + +#ifndef __cpp_lib_constexpr_algorithms +# error "Feature-test macro for constexpr algorithms missing" +#elif __cpp_lib_constexpr_algorithms < 201806L +# error "Feature-test macro for constexpr algorithms has wrong value" +#endif diff --git a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc index a95704dbb15..c578f5e92cb 100644 --- a/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/equal/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc index 2d570964405..ace753c10ea 100644 --- a/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/equal_range/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc index 31e3568dde3..02cf6d390d7 100644 --- a/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/fill/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc index a2011912805..45c60039e49 100644 --- a/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/fill_n/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc index 7d59de22833..b9d538cd485 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto oute = std::find(ca0.begin(), ca0.end(), 5); diff --git a/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc index 88d6cc7c0d1..8da8ad21e69 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find_end/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc index 99cbed28297..3d76aafc606 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find_first_of/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr std::array cas{{3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}}; diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc index 395a21e9b36..4f69ed5c472 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc index 5b1b9c3ad46..9d8e7c35acb 100644 --- a/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/find_if_not/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto outk = std::find_if_not(ca0.begin(), ca0.end(), diff --git a/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc index d900ef43a44..ee3d2d58ada 100644 --- a/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/for_each/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool diff --git a/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc index b0e26b69d91..38fd407dd60 100644 --- a/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/generate/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc index f2a203e9c76..ed70be7b1ce 100644 --- a/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/generate_n/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc index 5f25a304405..aeaab671b26 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_heap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - // heap constexpr std::array ah{{22, diff --git a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc index ddd4cdd10dc..e4c0e9c3ffa 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_heap_until/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - // heap constexpr std::array ahu{{22, diff --git a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc index 527746f56f3..8363c763c10 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_partitioned/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc index 3f5df35aaaa..1cd0cb811bc 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_permutation/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc index 623d72c1a59..0be2f5fed62 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr auto outv = std::is_sorted(ca0.begin(), ca0.end()); diff --git a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc index f109ee8ef10..1352c8b8e48 100644 --- a/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc index 9444bf49041..385065d97b2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/iter_swap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc index 93dee5d2f94..aa1bb66461d 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc index f8c191b0970..45eeeba294a 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc index 426310a7317..11ba681d9b2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/make_heap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc index e240e4453fd..cc8d3755da4 100644 --- a/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/merge/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc index 946199b0b7c..45fa7080457 100644 --- a/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/mismatch/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc index 4b5c21850fe..20a1019720d 100644 --- a/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/next_permutation/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc index 2d02adaec52..4655194ac5c 100644 --- a/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/none_of/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc index 1c4307478c6..3149e66b1e6 100644 --- a/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/nth_element/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc index b31be716830..64285bb28d2 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc index b7f538f4bef..d2adcb7257b 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partial_sort_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc index bd678afd0f5..17a5a410423 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partition/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc index 11c42ee77a5..5e282b2bd52 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partition_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc index 4ba82842362..ccfc514fc98 100644 --- a/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/partition_point/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array caeo{{0, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11}}; constexpr bool diff --git a/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc index ff9ca7bb71e..b0501c401dc 100644 --- a/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/pop_heap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc index a3a038c743c..39ef203ab11 100644 --- a/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/prev_permutation/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc index 04b5688d05c..2bca83c9557 100644 --- a/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/push_heap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc index 580ac10c75c..33b804eee58 100644 --- a/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/remove/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc index a20e5290e5b..2c289f3f811 100644 --- a/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc index 0758d101451..b743b762296 100644 --- a/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/remove_copy_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc index e8c00484c02..980af4aa6a9 100644 --- a/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/remove_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc index 754b8799740..ddb46fae5f9 100644 --- a/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc index 1fa6bb023bb..ff643a71322 100644 --- a/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/replace_copy_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool test() diff --git a/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc index 1dc28e1ddad..00b784fb6a8 100644 --- a/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/replace_if/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc index 8e1065b50ee..ba1f47b6127 100644 --- a/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/reverse/constexpr.cc @@ -20,12 +20,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc index 22401091465..fc60306f23f 100644 --- a/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/reverse_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc index b5862876290..b58f7f17b32 100644 --- a/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/rotate/constexpr.cc @@ -20,12 +20,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc index 63bca002144..1ee7c2120a4 100644 --- a/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/rotate_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc index a611c1c8584..a0335768cec 100644 --- a/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/search/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc index ac339202cc6..8769797adfd 100644 --- a/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/search_n/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array car{{0, 1, 2, 3, 4, 5, 6, 6, 8, 9, 9, 11}}; constexpr auto outuu = std::search_n(car.begin(), car.end(), 2, 6); diff --git a/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc index ff913eaffeb..3ea252e5591 100644 --- a/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/set_difference/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc index f1a95a29832..3f9b6bdc413 100644 --- a/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/set_intersection/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc index ff913eaffeb..3ea252e5591 100644 --- a/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/set_symmetric_difference/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc index 61d3f1e62a2..a47503b9c96 100644 --- a/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/set_union/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc index 7b91b75fce9..382e11480b5 100644 --- a/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/sort/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc index fa6e3093542..ed52a1b2d83 100644 --- a/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/sort_heap/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc index 7f2d1f8a9f2..a834a9e7f6f 100644 --- a/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/swap/constexpr.cc @@ -20,12 +20,6 @@ #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc index a99155bb1da..4d190184fcd 100644 --- a/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/swap_ranges/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_swap_algorithms -# error "Feature-test macro for constexpr swap algorithms missing" -#elif __cpp_lib_constexpr_swap_algorithms < 201806L -# error "Feature-test macro for constexpr swap algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc index 03c6d71db42..e35e9c19982 100644 --- a/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/transform/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr std::array ca0{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}}; constexpr bool test() diff --git a/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc index f90aaac0d99..261dfa9d3fd 100644 --- a/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/unique/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc index f13f3885698..da7eabba6f1 100644 --- a/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/unique_copy/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() { diff --git a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc index a0a8e25dc08..f6312b8fb75 100644 --- a/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc +++ b/libstdc++-v3/testsuite/25_algorithms/upper_bound/constexpr.cc @@ -21,12 +21,6 @@ #include #include -#ifndef __cpp_lib_constexpr_algorithms -# error "Feature-test macro for constexpr algorithms missing" -#elif __cpp_lib_constexpr_algorithms < 201711L -# error "Feature-test macro for constexpr algorithms has wrong value" -#endif - constexpr bool test() {