Skip to content

Commit eb84acf

Browse files
committed
17guard
1 parent 8f5011f commit eb84acf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libcxx/include/__algorithm/stable_sort.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ struct __stable_sort_switch {
195195
static const unsigned value = 128 * is_trivially_copy_assignable<_Tp>::value;
196196
};
197197

198+
#if _LIBCPP_STD_VER >= 17
198199
template <class _Tp>
199200
constexpr unsigned __radix_sort_min_bound() {
200201
static_assert(is_integral<_Tp>::value);
@@ -214,6 +215,7 @@ constexpr unsigned __radix_sort_max_bound() {
214215

215216
return 1 << 16;
216217
}
218+
#endif // _LIBCPP_STD_VER > 17
217219

218220
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
219221
void __stable_sort(_RandomAccessIterator __first,
@@ -237,6 +239,8 @@ void __stable_sort(_RandomAccessIterator __first,
237239
std::__insertion_sort<_AlgPolicy, _Compare>(__first, __last, __comp);
238240
return;
239241
}
242+
243+
#if _LIBCPP_STD_VER >= 17
240244
constexpr auto __default_comp =
241245
__desugars_to_v<__totally_ordered_less_tag, __remove_cvref_t<_Compare>, value_type, value_type >;
242246
constexpr auto __integral_value = is_integral_v<value_type >;
@@ -248,6 +252,8 @@ void __stable_sort(_RandomAccessIterator __first,
248252
return;
249253
}
250254
}
255+
#endif // _LIBCPP_STD_VER > 17
256+
251257
typename iterator_traits<_RandomAccessIterator>::difference_type __l2 = __len / 2;
252258
_RandomAccessIterator __m = __first + __l2;
253259
if (__len <= __buff_size) {

0 commit comments

Comments
 (0)