Skip to content

Commit

Permalink
invoke-of
Browse files Browse the repository at this point in the history
  • Loading branch information
izvolov committed Nov 12, 2024
1 parent beee4e6 commit 5af8bc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libcxx/include/__algorithm/radix_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ __partial_sum_max(_InputIterator __first, _InputIterator __last, _OutputIterator

template <class _Value, class _Map, class _Radix>
struct __radix_sort_traits {
using __image_type = decay_t<invoke_result_t<_Map, _Value> >;
using __image_type = decay_t<typename __invoke_of<_Map, _Value>::type>;
static_assert(is_unsigned<__image_type>::value, "");

using __radix_type = decay_t<invoke_result_t<_Radix, __image_type> >;
using __radix_type = decay_t<typename __invoke_of<_Radix, __image_type>::type>;
static_assert(is_integral<__radix_type>::value, "");

constexpr static auto __radix_value_range = numeric_limits<__radix_type>::max() + 1;
Expand All @@ -101,7 +101,7 @@ struct __radix_sort_traits {

template <class _Value, class _Map>
struct __counting_sort_traits {
using __image_type = decay_t<invoke_result_t<_Map, _Value> >;
using __image_type = decay_t<typename __invoke_of<_Map, _Value>::type>;
static_assert(is_unsigned<__image_type>::value, "");

constexpr static const auto __value_range = numeric_limits<__image_type>::max() + 1;
Expand Down Expand Up @@ -158,7 +158,7 @@ _LIBCPP_HIDE_FROM_ABI bool __collect_impl(
using value_type = __iter_value_type<_ForwardIterator>;
constexpr auto __radix_value_range = __radix_sort_traits<value_type, _Map, _Radix>::__radix_value_range;

auto __previous = numeric_limits<invoke_result_t<_Map, value_type> >::min();
auto __previous = numeric_limits<typename __invoke_of<_Map, value_type>::type>::min();
auto __is_sorted = true;
std::for_each(__first, __last, [&__counters, &__map, &__radix, &__previous, &__is_sorted](const auto& value) {
auto __current = __map(value);
Expand Down

0 comments on commit 5af8bc7

Please sign in to comment.