Skip to content

Commit 48da33f

Browse files
committed
rm-expand-variadic-macro
1 parent 82b0ac2 commit 48da33f

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

libcxx/include/__algorithm/radix_sort.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
4848

4949
#if _LIBCPP_STD_VER >= 14
5050

51-
inline _LIBCPP_HIDE_FROM_ABI void __variadic_expansion_dummy(initializer_list<int>) {}
52-
53-
# define _EXPAND_VARIADIC(expression) std::__variadic_expansion_dummy({(expression, 0)...})
54-
5551
template <class _Iterator,
5652
enable_if_t<is_move_assignable<typename iterator_traits<_Iterator>::value_type>::value, int> = 0>
5753
_LIBCPP_HIDE_FROM_ABI constexpr move_iterator<_Iterator> __move_assign_please(_Iterator __i) {
@@ -173,13 +169,13 @@ _LIBCPP_HIDE_FROM_ABI bool __collect_impl(
173169
__is_sorted &= (__current >= __previous);
174170
__previous = __current;
175171

176-
_EXPAND_VARIADIC(++__counters[_Radices][std::__nth_radix(_Radices, __radix)(__current)]);
172+
(++__counters[_Radices][std::__nth_radix(_Radices, __radix)(__current)], ...);
177173
});
178174

179-
_EXPAND_VARIADIC(
180-
__maximums[_Radices] =
181-
std::__partial_sum_max(__counters[_Radices], __counters[_Radices] + __radix_value_range, __counters[_Radices])
182-
.second);
175+
((__maximums[_Radices] =
176+
std::__partial_sum_max(__counters[_Radices], __counters[_Radices] + __radix_value_range, __counters[_Radices])
177+
.second),
178+
...);
183179

184180
return __is_sorted;
185181
}
@@ -353,8 +349,6 @@ __radix_sort(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterat
353349
return false;
354350
}
355351

356-
# undef _EXPAND_VARIADIC
357-
358352
#else // _LIBCPP_STD_VER > 14
359353

360354
template <class _RandomAccessIterator1, class _RandomAccessIterator2, bool _EnableRadixSort>

0 commit comments

Comments
 (0)