[PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

Jonathan Wakely jwakely@redhat.com
Wed Aug 14 16:02:00 GMT 2019


On 14/08/19 11:06 -0400, Ed Smith-Rowland wrote:
>I this OK after it passes testing?
>
>Ed
>
>
>

>2019-08-14  Edward Smith-Rowland  <3dw4rd@verizon.net>
>
>	Implement C++20 p0879 - Constexpr for swap and swap related functions.
>	* include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
>	New macro.
>	* include/std/version: Ditto.

It looks like this line was inserted in the wrong place, as the lines
that follow it are not part of <version>. The entry for
include/std/version should be after include/std/type_traits.


>	(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.

i.e. here.

OK for trunk with that change if testing passes. Thanks!




More information about the Libstdc++ mailing list