cpp-sort icon indicating copy to clipboard operation
cpp-sort copied to clipboard

Upgrade to C++23

Open Morwenn opened this issue 4 years ago • 0 comments

~~Still lots of time before actually getting to that issue, especially since there's the whole C++20 thing (#112) and 2.0.0 version to handle first, so this is more of a wish list for a distant future. The first step will likely be to conditionally support some features to 2.x.y at some point, and even to 1.x.y when it makes sense and it's not too difficult, then the rest will be nice things to have if there's ever a breaking change post 2.0.0.~~

Plans changed: I never finished version 2.x.y and we're already years later, so I might as well target C++23 directly, be it only to finally be done with mutable sorters.

This issues list can be used to track papers that were plenary approved for C++23.

Conditionally support back to 1.x.y

  • [ ] Support for fixed-width floating point types.
  • [ ] [[assume]] as the preferred implementation for CPPSORT_ASSUME when available.
  • [ ] There might be uses for std::stacktrace, I need to investigate.
  • TODO

Might be useful for 2.x.y

  • [ ] std::allocator::allocate_at_least
  • [x] Deducing this will finally allow a way forward to implement mutable sorters (issue #104).
  • [x] Deducing this for various function adapters.
  • [x] auto(x) can replace CPPSORT_AUTO_CAST in <cpp-sort/mstd/ranges.h>.
  • [ ] auto(x) for apply_permutation tests, update doc accordingly.
  • [ ] if consteval might help with the constexpr algorithms.
  • [x] std::unreachable() surely has its uses in places.
  • [ ] constexpr std::unique_ptr, <cmath>, <cstdlib> (issue #58).
  • [x] static operator() for simple function objects
  • [ ] Can we support static operator() for sorters? It seems very tricky to make it useful in a reasonable fashion.
  • [ ] static constexpr variables in constexpr functions for better codegen?
  • [ ] Add test with std::views::zip
  • TODO

Morwenn avatar Jun 10 '21 10:06 Morwenn