2019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++20 p0879 - Constexpr for swap and swap related functions. * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro. * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms): New macro. (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap) (prev_permutation, push_heap, reverse, rotate, sort_heap, swap) (swap_ranges, nth_element, partial_sort, sort): Add constexpr. * include/bits/move.h (swap): Add constexpr. * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse) (__gcd, __rotate, rotate, __partition, __heap_select) (__partial_sort_copy, partial_sort_copy, __unguarded_partition) (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort) (__introselect, __chunk_insertion_sort, next_permutation) (prev_permutation, partition, partial_sort, nth_element, sort) (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr. * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap) (swap_ranges): Add constexpr. * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap, __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Add constexpr. * include/std/type_traits (swap): Add constexpr. * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr. * testsuite/25_algorithms/iter_swap/constexpr.cc: New test. * testsuite/25_algorithms/make_heap/constexpr.cc: New test. * testsuite/25_algorithms/next_permutation/constexpr.cc: New test. * testsuite/25_algorithms/nth_element/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort/constexpr.cc: New test. * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test. * testsuite/25_algorithms/partition/constexpr.cc: New test. * testsuite/25_algorithms/pop_heap/constexpr.cc: New test. * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test. * testsuite/25_algorithms/push_heap/constexpr.cc: New test. * testsuite/25_algorithms/reverse/constexpr.cc: New test. * testsuite/25_algorithms/rotate/constexpr.cc: New test. * testsuite/25_algorithms/sort/constexpr.cc: New test. * testsuite/25_algorithms/sort_heap/constexpr.cc: New test. * testsuite/25_algorithms/swap/constexpr.cc: New test. * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test. From-SVN: r274488
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| adjacent_find | Loading commit data... | |
| advance/istreambuf_iterators | Loading commit data... | |
| all_of | Loading commit data... | |
| any_of | Loading commit data... | |
| binary_search | Loading commit data... | |
| clamp | Loading commit data... | |
| copy | Loading commit data... | |
| copy_backward | Loading commit data... | |
| copy_if | Loading commit data... | |
| copy_n | Loading commit data... | |
| count | Loading commit data... | |
| count_if | Loading commit data... | |
| equal | Loading commit data... | |
| equal_range | Loading commit data... | |
| fill | Loading commit data... | |
| fill_n | Loading commit data... | |
| find | Loading commit data... | |
| find_end | Loading commit data... | |
| find_first_of | Loading commit data... | |
| find_if | Loading commit data... | |
| find_if_not | Loading commit data... | |
| for_each | Loading commit data... | |
| generate | Loading commit data... | |
| generate_n | Loading commit data... | |
| headers | Loading commit data... | |
| heap | Loading commit data... | |
| includes | Loading commit data... | |
| inplace_merge | Loading commit data... | |
| is_heap | Loading commit data... | |
| is_heap_until | Loading commit data... | |
| is_partitioned | Loading commit data... | |
| is_permutation | Loading commit data... | |
| is_sorted | Loading commit data... | |
| is_sorted_until | Loading commit data... | |
| iter_swap | Loading commit data... | |
| lexicographical_compare | Loading commit data... | |
| lower_bound | Loading commit data... | |
| make_heap | Loading commit data... | |
| max | Loading commit data... | |
| max_element | Loading commit data... | |
| merge | Loading commit data... | |
| min | Loading commit data... | |
| min_element | Loading commit data... | |
| minmax | Loading commit data... | |
| minmax_element | Loading commit data... | |
| mismatch | Loading commit data... | |
| move | Loading commit data... | |
| move_backward | Loading commit data... | |
| next_permutation | Loading commit data... | |
| none_of | Loading commit data... | |
| nth_element | Loading commit data... | |
| partial_sort | Loading commit data... | |
| partial_sort_copy | Loading commit data... | |
| partition | Loading commit data... | |
| partition_copy | Loading commit data... | |
| partition_point | Loading commit data... | |
| pop_heap | Loading commit data... | |
| prev_permutation | Loading commit data... | |
| pstl | Loading commit data... | |
| push_heap | Loading commit data... | |
| random_shuffle | Loading commit data... | |
| remove | Loading commit data... | |
| remove_copy | Loading commit data... | |
| remove_copy_if | Loading commit data... | |
| remove_if | Loading commit data... | |
| replace | Loading commit data... | |
| replace_copy | Loading commit data... | |
| replace_copy_if | Loading commit data... | |
| replace_if | Loading commit data... | |
| reverse | Loading commit data... | |
| reverse_copy | Loading commit data... | |
| rotate | Loading commit data... | |
| rotate_copy | Loading commit data... | |
| sample | Loading commit data... | |
| search | Loading commit data... | |
| search_n | Loading commit data... | |
| set_difference | Loading commit data... | |
| set_intersection | Loading commit data... | |
| set_symmetric_difference | Loading commit data... | |
| set_union | Loading commit data... | |
| shuffle | Loading commit data... | |
| sort | Loading commit data... | |
| sort_heap | Loading commit data... | |
| stable_partition | Loading commit data... | |
| stable_sort | Loading commit data... | |
| swap | Loading commit data... | |
| swap_ranges | Loading commit data... | |
| transform | Loading commit data... | |
| unique | Loading commit data... | |
| unique_copy | Loading commit data... | |
| upper_bound | Loading commit data... | |
| constexpr_macro.cc | Loading commit data... |