[all-commits] [llvm/llvm-project] c75c65: [libc++] Slightly improve constexpr test coverage ...

Quuxplusone via All-commits all-commits at lists.llvm.org
Fri Dec 4 14:55:02 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c75c6549ba7cadbbd51cae88d4ed286a6290a66b
      https://github.com/llvm/llvm-project/commit/c75c6549ba7cadbbd51cae88d4ed286a6290a66b
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp

  Log Message:
  -----------
  [libc++] Slightly improve constexpr test coverage for std::includes.

Differential Revision: https://reviews.llvm.org/D92255


  Commit: 14098cf6c0a448520a70196a06de589abd9eee25
      https://github.com/llvm/llvm-project/commit/14098cf6c0a448520a70196a06de589abd9eee25
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M libcxx/docs/Cxx2aStatus.rst
    M libcxx/docs/Cxx2aStatusPaperStatus.csv
    M libcxx/include/algorithm
    M libcxx/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/set_symmetric_difference_comp.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/set_union_comp.pass.cpp
    A libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h

  Log Message:
  -----------
  [libc++] [P0202] constexpr set_union, set_difference, set_symmetric_difference, merge

These had been waiting on the ability to use `std::copy` from
constexpr code (which in turn had been waiting on the ability to
use `is_constant_evaluated()` to switch between `memmove` and non-`memmove`
implementations of `std::copy`). That work landed a while ago,
so these algorithms can all be constexpr in C++20 now.

Simultaneously, update the tests for the set algorithms.

- Use an element type with "equivalent but not identical" values.
- The custom-comparator tests now pass something different from `operator<`.
- Make the constexpr coverage match the non-constexpr coverage.

Differential Revision: https://reviews.llvm.org/D92255


  Commit: b8bc4e153f01002a52ce628ef53486c4396863b3
      https://github.com/llvm/llvm-project/commit/b8bc4e153f01002a52ce628ef53486c4396863b3
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M libcxx/include/algorithm

  Log Message:
  -----------
  [libc++] Update the commented "synopsis" in <algorithm> to match current reality.

The synopsis now reflects what's implemented. It does NOT reflect
all of what's specified in C++20. The "constexpr in C++20" markings
are still missing from these 12 algorithms, because they are still
unimplemented by libc++:

    reverse partition sort nth_element next_permutation prev_permutation
    push_heap pop_heap make_heap sort_heap partial_sort partial_sort_copy

All of the above algorithms were excluded from [P0202].

All of the above algorithms were made constexpr in [P0879] (along with
swap_ranges, iter_swap, and rotate — we've already implemented those three).

Differential Revision: https://reviews.llvm.org/D92255


Compare: https://github.com/llvm/llvm-project/compare/23034a4a63e1...b8bc4e153f01


More information about the All-commits mailing list