11 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
![]() |
6441eb6dc0 | Update copyright years. | ||
![]() |
a945c346f5 | Update copyright years. | ||
![]() |
7dbb691309 |
libstdc++: Remove dg-options "-std=gnu++2a" from constrained algo tests
The testsuite will automatically select C++20 for these tests now, and removing the hardcoded -std option allows them to be tested for C++23 and C++26 as well. libstdc++-v3/ChangeLog: * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Remove dg-options. * testsuite/20_util/function_objects/range.cmp/greater.cc: Likewise. * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: Likewise. * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise. * testsuite/20_util/function_objects/range.cmp/less_equal.cc: Likewise. * testsuite/20_util/function_objects/range.cmp/lwg3530.cc: Likewise. * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: Likewise. * testsuite/20_util/specialized_algorithms/construct_at/1.cc: Likewise. * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc: Likewise. * testsuite/20_util/specialized_algorithms/construct_at/95788.cc: Likewise. * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc: Likewise. * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc: Likewise. * testsuite/25_algorithms/adjacent_find/constexpr.cc: Likewise. * testsuite/25_algorithms/adjacent_find/constrained.cc: Likewise. * testsuite/25_algorithms/all_of/constexpr.cc: Likewise. * testsuite/25_algorithms/all_of/constrained.cc: Likewise. * testsuite/25_algorithms/any_of/constexpr.cc: Likewise. * testsuite/25_algorithms/any_of/constrained.cc: Likewise. * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise. * testsuite/25_algorithms/binary_search/constrained.cc: Likewise. * testsuite/25_algorithms/clamp/constrained.cc: Likewise. * testsuite/25_algorithms/constexpr_macro.cc: Likewise. * testsuite/25_algorithms/copy/95578.cc: Likewise. * testsuite/25_algorithms/copy/constexpr.cc: Likewise. * testsuite/25_algorithms/copy/constrained.cc: Likewise. * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Likewise. * testsuite/25_algorithms/copy_backward/95578.cc: Likewise. * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise. * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise. * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: Likewise. * testsuite/25_algorithms/copy_if/constexpr.cc: Likewise. * testsuite/25_algorithms/copy_if/constrained.cc: Likewise. * testsuite/25_algorithms/copy_n/constexpr.cc: Likewise. * testsuite/25_algorithms/copy_n/constrained.cc: Likewise. * testsuite/25_algorithms/count/constexpr.cc: Likewise. * testsuite/25_algorithms/count/constrained.cc: Likewise. * testsuite/25_algorithms/count_if/constexpr.cc: Likewise. * testsuite/25_algorithms/count_if/constrained.cc: Likewise. * testsuite/25_algorithms/cpp_lib_constexpr.cc: Likewise. * testsuite/25_algorithms/equal/95578.cc: Likewise. * testsuite/25_algorithms/equal/constexpr.cc: Likewise. * testsuite/25_algorithms/equal/constexpr_neg.cc: Likewise. * testsuite/25_algorithms/equal/constrained.cc: Likewise. * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise. * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise. * testsuite/25_algorithms/equal_range/constrained.cc: Likewise. * testsuite/25_algorithms/fill/94017.cc: Likewise. * testsuite/25_algorithms/fill/constexpr.cc: Likewise. * testsuite/25_algorithms/fill/constrained.cc: Likewise. * testsuite/25_algorithms/fill_n/94017.cc: Likewise. * testsuite/25_algorithms/fill_n/constexpr.cc: Likewise. * testsuite/25_algorithms/fill_n/constrained.cc: Likewise. * testsuite/25_algorithms/find/constexpr.cc: Likewise. * testsuite/25_algorithms/find/constrained.cc: Likewise. * testsuite/25_algorithms/find_end/constexpr.cc: Likewise. * testsuite/25_algorithms/find_end/constrained.cc: Likewise. * testsuite/25_algorithms/find_first_of/constexpr.cc: Likewise. * testsuite/25_algorithms/find_first_of/constrained.cc: Likewise. * testsuite/25_algorithms/find_if/constexpr.cc: Likewise. * testsuite/25_algorithms/find_if/constrained.cc: Likewise. * testsuite/25_algorithms/find_if_not/constexpr.cc: Likewise. * testsuite/25_algorithms/find_if_not/constrained.cc: Likewise. * testsuite/25_algorithms/for_each/constexpr.cc: Likewise. * testsuite/25_algorithms/for_each/constrained.cc: Likewise. * testsuite/25_algorithms/generate/constexpr.cc: Likewise. * testsuite/25_algorithms/generate/constrained.cc: Likewise. * testsuite/25_algorithms/generate_n/constexpr.cc: Likewise. * testsuite/25_algorithms/generate_n/constrained.cc: Likewise. * testsuite/25_algorithms/heap/constrained.cc: Likewise. * testsuite/25_algorithms/includes/constrained.cc: Likewise. * testsuite/25_algorithms/inplace_merge/constrained.cc: Likewise. * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise. * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise. * testsuite/25_algorithms/is_partitioned/constrained.cc: Likewise. * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise. * testsuite/25_algorithms/is_permutation/constrained.cc: Likewise. * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise. * testsuite/25_algorithms/is_sorted/constrained.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/constrained.cc: Likewise. * testsuite/25_algorithms/iter_swap/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/93972.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/95578.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constrained.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare_three_way/constexpr.cc: Likewise. * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise. * testsuite/25_algorithms/lower_bound/constrained.cc: Likewise. * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: Likewise. * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise. * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: Likewise. * testsuite/25_algorithms/make_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/max/constrained.cc: Likewise. * testsuite/25_algorithms/max_element/constrained.cc: Likewise. * testsuite/25_algorithms/merge/constexpr.cc: Likewise. * testsuite/25_algorithms/merge/constrained.cc: Likewise. * testsuite/25_algorithms/min/constrained.cc: Likewise. * testsuite/25_algorithms/min_element/constrained.cc: Likewise. * testsuite/25_algorithms/minmax/constrained.cc: Likewise. * testsuite/25_algorithms/minmax_element/constrained.cc: Likewise. * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise. * testsuite/25_algorithms/mismatch/constrained.cc: Likewise. * testsuite/25_algorithms/move/93872.cc: Likewise. * testsuite/25_algorithms/move/95578.cc: Likewise. * testsuite/25_algorithms/move/constexpr.cc: Likewise. * testsuite/25_algorithms/move/constrained.cc: Likewise. * testsuite/25_algorithms/move_backward/93872.cc: Likewise. * testsuite/25_algorithms/move_backward/95578.cc: Likewise. * testsuite/25_algorithms/move_backward/constrained.cc: Likewise. * testsuite/25_algorithms/next_permutation/constexpr.cc: Likewise. * testsuite/25_algorithms/next_permutation/constrained.cc: Likewise. * testsuite/25_algorithms/none_of/constexpr.cc: Likewise. * testsuite/25_algorithms/none_of/constrained.cc: Likewise. * testsuite/25_algorithms/nth_element/constexpr.cc: Likewise. * testsuite/25_algorithms/nth_element/constrained.cc: Likewise. * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise. * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise. * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise. * testsuite/25_algorithms/partition/constexpr.cc: Likewise. * testsuite/25_algorithms/partition/constrained.cc: Likewise. * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/partition_copy/constrained.cc: Likewise. * testsuite/25_algorithms/partition_point/constexpr.cc: Likewise. * testsuite/25_algorithms/partition_point/constrained.cc: Likewise. * testsuite/25_algorithms/pop_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/prev_permutation/constexpr.cc: Likewise. * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise. * testsuite/25_algorithms/push_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/remove/constexpr.cc: Likewise. * testsuite/25_algorithms/remove/constrained.cc: Likewise. * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy/constrained.cc: Likewise. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy_if/constrained.cc: Likewise. * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_if/constrained.cc: Likewise. * testsuite/25_algorithms/replace/constrained.cc: Likewise. * testsuite/25_algorithms/replace_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/replace_copy/constrained.cc: Likewise. * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Likewise. * testsuite/25_algorithms/replace_copy_if/constrained.cc: Likewise. * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise. * testsuite/25_algorithms/replace_if/constrained.cc: Likewise. * testsuite/25_algorithms/reverse/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse/constrained.cc: Likewise. * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse_copy/constrained.cc: Likewise. * testsuite/25_algorithms/rotate/constexpr.cc: Likewise. * testsuite/25_algorithms/rotate/constrained.cc: Likewise. * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/rotate_copy/constrained.cc: Likewise. * testsuite/25_algorithms/sample/constrained.cc: Likewise. * testsuite/25_algorithms/search/constexpr.cc: Likewise. * testsuite/25_algorithms/search/constrained.cc: Likewise. * testsuite/25_algorithms/search_n/97828.cc: Likewise. * testsuite/25_algorithms/search_n/constexpr.cc: Likewise. * testsuite/25_algorithms/search_n/constrained.cc: Likewise. * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_difference/constrained.cc: Likewise. * testsuite/25_algorithms/set_intersection/constexpr.cc: Likewise. * testsuite/25_algorithms/set_intersection/constrained.cc: Likewise. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: Likewise. * testsuite/25_algorithms/set_union/constexpr.cc: Likewise. * testsuite/25_algorithms/set_union/constrained.cc: Likewise. * testsuite/25_algorithms/shift_left/1.cc: Likewise. * testsuite/25_algorithms/shift_right/1.cc: Likewise. * testsuite/25_algorithms/shuffle/constrained.cc: Likewise. * testsuite/25_algorithms/sort/constexpr.cc: Likewise. * testsuite/25_algorithms/sort/constrained.cc: Likewise. * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise. * testsuite/25_algorithms/stable_partition/constrained.cc: Likewise. * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise. * testsuite/25_algorithms/swap/constexpr.cc: Likewise. * testsuite/25_algorithms/swap_ranges/constexpr.cc: Likewise. * testsuite/25_algorithms/swap_ranges/constrained.cc: Likewise. * testsuite/25_algorithms/transform/constexpr.cc: Likewise. * testsuite/25_algorithms/transform/constrained.cc: Likewise. * testsuite/25_algorithms/unique/constexpr.cc: Likewise. * testsuite/25_algorithms/unique/constrained.cc: Likewise. * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/unique_copy/constrained.cc: Likewise. * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise. * testsuite/25_algorithms/upper_bound/constrained.cc: Likewise. * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: Likewise. * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise. * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: Likewise. |
||
![]() |
83ffe9cde7 | Update copyright years. | ||
![]() |
7adcbafe45 | Update copyright years. | ||
![]() |
99dee82307 | Update copyright years. | ||
![]() |
8c84486bba |
libstdc++: Improve tests for constexpr algorithms
These tests just return true without checking that the results of the algorithms. Although it should be safe to assume that the algorithms behave the same at compile-time as at run-time, we can use these tests to verify it. This replaces each 'return true' statement with a condition that depends on the basic functionality of the algorithm, such as returning an iterator to the right position. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/all_of/constexpr.cc: Check result of the algorithm. * testsuite/25_algorithms/any_of/constexpr.cc: Likewise. * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise. * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise. * testsuite/25_algorithms/count/constexpr.cc: Likewise. * testsuite/25_algorithms/equal/constexpr.cc: Likewise. * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise. * testsuite/25_algorithms/fill/constexpr.cc: Likewise. * testsuite/25_algorithms/find_end/constexpr.cc: Likewise. * testsuite/25_algorithms/find_if/constexpr.cc: Likewise. * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise. * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Likewise. * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise. * testsuite/25_algorithms/merge/constexpr.cc: Likewise. * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise. * testsuite/25_algorithms/none_of/constexpr.cc: Likewise. * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise. * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/search/constexpr.cc: Likewise. * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_intersection/constexpr.cc: Likewise. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_union/constexpr.cc: Likewise. * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise. |
||
![]() |
8d9254fc8a |
Update copyright years.
From-SVN: r279813 |
||
![]() |
97d5766531 |
stl_algo.h (merge): Fix documentation.
2019-09-28 François Dumont <fdumont@gcc.gnu.org> * include/bits/stl_algo.h (merge): Fix documentation. * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr. (__check_sorted): Likewise and remove nested irreflexive check. (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr. (__check_partitioned_lower, __check_partitioned_upper): Likewise. (_Irreflexive_checker::_S_is_valid): Likewise. (__is_irreflexive, __is_irreflexive_pred): Likewise. * include/debug/helper_functions.h (__get_distance): Add constexpr. (__valid_range_aux): Add C++20 constexpr. (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)): Likewise and add std::is_constant_evaluated check. (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New. (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New. (__valid_range_aux(_Integral, _Integral, std::__true_type)): New, use latter. (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and __builtin_is_contant_evaludated check.. (__can_advance, __base): Add constexpr. * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED] (_GLIBCXX_DEBUG_VERIFY_COND_AT): New. (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive. (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred. * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive std::less. * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise. * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix lambda to be irreflexive. From-SVN: r276260 |
||
![]() |
b30ee71a40 |
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 <algorith>. * testsuite/20_util/exchange/constexpr.cc: Add check for __cpp_lib_constexpr macro in <utility>. * 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 |
||
![]() |
3a66e68ad9 |
Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers.
2019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p0202 - Add Constexpr Modifiers to Functions in <algorithm> and <utility> Headers. Implement C++20 p1023 - constexpr comparison operators for std::array. * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy, copy_backward, copy_if, copy_n, equal_range, fill, find_end, find_if_not, includes, is_heap, is_heap_until, is_partitioned, is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound, none_of, partition_copy, partition_point, remove, remove_if, remove_copy, remove_copy_if, replace_copy, replace_copy_if, reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count, count_if, equal, find, find_first_of, find_if, for_each, generate, generate_n, lexicographical_compare, merge, mismatch, replace, replace_if, search, search_n, set_difference, set_intersection, set_symmetric_difference, set_union, transform, unique_copy): Mark constexpr. * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr. * include/bits/predefined_ops.h (_Iter_less_val::operator(), _Val_less_iter::operator(), _Iter_equal_to_iter::operator(), _Iter_equal_to_val::operator(), _Iter_equals_val::operator()): Use const ref instead of ref arg; (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter, __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val, _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val, _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter, _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter, __iter_comp_iter): Mark constexpr. * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n, __search, __search_n_aux, __search_n, __find_end, find_end, all_of, none_of, any_of, find_if_not, is_partitioned, partition_point, __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n, copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find, __unique, unique, __unique_copy, reverse_copy, rotate_copy, __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort, __final_insertion_sort, lower_bound, __upper_bound, upper_bound, __equal_range, equal_range, binary_search, __includes, includes, __next_permutation, __prev_permutation, __replace_copy_if, replace_copy, replace_copy_if, __count_if, is_sorted, __is_sorted_until, is_sorted_until, __is_permutation, is_permutation, for_each, find, find_if, find_first_of, adjacent_find, count, count_if, search, search_n, transform, replace, replace_if, generate, generate_n, unique_copy, __merge, merge, __set_union, set_union, __set_intersection, set_intersection, __set_difference, set_difference, __set_symmetric_difference, set_symmetric_difference): Mark constexpr. * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr wrappers around __builtin_memmove and __builtin_memcmp respectively; (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2, copy, move, __copy_move_b, __copy_move_backward_a, __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill, __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2, __lexicographical_compare_impl, __lexicographical_compare, __lexicographical_compare<true>::__lc, __lexicographical_compare_aux, __lower_bound, lower_bound, equal, __equal4, lexicographical_compare, __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until, is_heap): Mark constexpr. * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until, is_heap): Mark constexpr. * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr. * include/std/array: Make comparison ops constexpr. * include/std/utility: Make exchange constexpr. * include/std/version (__cpp_lib_constexpr_algorithms): New macro. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust. * testsuite/23_containers/array/tuple_interface/ tuple_element_neg.cc: Adjust. * testsuite/20_util/exchange/constexpr.cc: New. * testsuite/23_containers/array/comparison_operators/constexpr.cc: New. * testsuite/25_algorithms/constexpr_macro.cc: New. * testsuite/25_algorithms/adjacent_find/constexpr.cc: New. * testsuite/25_algorithms/all_of/constexpr.cc: New. * testsuite/25_algorithms/any_of/constexpr.cc: New. * testsuite/25_algorithms/binary_search/constexpr.cc: New. * testsuite/25_algorithms/copy/constexpr.cc: New. * testsuite/25_algorithms/copy_backward/constexpr.cc: New. * testsuite/25_algorithms/copy_if/constexpr.cc: New. * testsuite/25_algorithms/copy_n/constexpr.cc: New. * testsuite/25_algorithms/count/constexpr.cc: New. * testsuite/25_algorithms/count_if/constexpr.cc: New. * testsuite/25_algorithms/equal/constexpr.cc: New. * testsuite/25_algorithms/equal_range/constexpr.cc: New. * testsuite/25_algorithms/fill/constexpr.cc: New. * testsuite/25_algorithms/fill_n/constexpr.cc: New. * testsuite/25_algorithms/find/constexpr.cc: New. * testsuite/25_algorithms/find_end/constexpr.cc: New. * testsuite/25_algorithms/find_first_of/constexpr.cc: New. * testsuite/25_algorithms/find_if/constexpr.cc: New. * testsuite/25_algorithms/find_if_not/constexpr.cc: New. * testsuite/25_algorithms/for_each/constexpr.cc: New. * testsuite/25_algorithms/generate/constexpr.cc: New. * testsuite/25_algorithms/generate_n/constexpr.cc: New. * testsuite/25_algorithms/is_heap/constexpr.cc: New. * testsuite/25_algorithms/is_heap_until/constexpr.cc: New. * testsuite/25_algorithms/is_partitioned/constexpr.cc: New. * testsuite/25_algorithms/is_permutation/constexpr.cc: New. * testsuite/25_algorithms/is_sorted/constexpr.cc: New. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New. * testsuite/25_algorithms/lower_bound/constexpr.cc: New. * testsuite/25_algorithms/merge/constexpr.cc: New. * testsuite/25_algorithms/mismatch/constexpr.cc: New. * testsuite/25_algorithms/none_of/constexpr.cc: New. * testsuite/25_algorithms/partition_copy/constexpr.cc: New. * testsuite/25_algorithms/partition_point/constexpr.cc: New. * testsuite/25_algorithms/remove/constexpr.cc: New. * testsuite/25_algorithms/remove_copy/constexpr.cc: New. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New. * testsuite/25_algorithms/remove_if/constexpr.cc: New. * testsuite/25_algorithms/replace_copy/constexpr.cc: New. * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New. * testsuite/25_algorithms/replace_if/constexpr.cc: New. * testsuite/25_algorithms/reverse_copy/constexpr.cc: New. * testsuite/25_algorithms/rotate_copy/constexpr.cc: New. * testsuite/25_algorithms/search/constexpr.cc: New. * testsuite/25_algorithms/search_n/constexpr.cc: New. * testsuite/25_algorithms/set_difference/constexpr.cc: New. * testsuite/25_algorithms/set_intersection/constexpr.cc: New. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New. * testsuite/25_algorithms/set_union/constexpr.cc: New. * testsuite/25_algorithms/transform/constexpr.cc: New. * testsuite/25_algorithms/unique/constexpr.cc: New. * testsuite/25_algorithms/unique_copy/constexpr.cc: New. * testsuite/25_algorithms/upper_bound/constexpr.cc: New. From-SVN: r273975 |