[libcxx-commits] [libcxx] [libc++] Support `constexpr` for `std::stable_sort` in radix sort branch (PR #125284)
Дмитрий Изволов via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 31 12:21:06 PST 2025
================
@@ -253,6 +253,12 @@ _LIBCPP_CONSTEXPR_SINCE_CXX26 void __stable_sort(
if constexpr (__allowed_radix_sort) {
if (__len <= __buff_size && __len >= static_cast<difference_type>(__radix_sort_min_bound<value_type>()) &&
__len <= static_cast<difference_type>(__radix_sort_max_bound<value_type>())) {
+ for (auto* p = __buff; p < __buff + __buff_size; ++p) {
----------------
izvolov wrote:
This looks disgusting, but taking `__construct_at` inside radix_sort would degrade the design of the algorithm.
Maybe the better solution exists?
https://github.com/llvm/llvm-project/pull/125284
More information about the libcxx-commits
mailing list