Skip to content

Commit 58be5a7

Browse files
committed
desugars
1 parent d9cd39e commit 58be5a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcxx/include/__algorithm/ranges_stable_sort.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include <__ranges/access.h>
2525
#include <__ranges/concepts.h>
2626
#include <__ranges/dangling.h>
27+
#include <__type_traits/desugars_to.h>
2728
#include <__type_traits/is_integral.h>
28-
#include <__type_traits/is_same.h>
2929
#include <__utility/forward.h>
3030
#include <__utility/move.h>
3131

@@ -47,7 +47,8 @@ struct __stable_sort {
4747
auto __last_iter = ranges::next(__first, __last);
4848

4949
auto&& __projected_comp = std::__make_projected(__comp, __proj);
50-
constexpr auto __default_comp = is_same_v<_Comp, ranges::less>;
50+
constexpr auto __default_comp =
51+
__desugars_to_v<__totally_ordered_less_tag, _Comp, iter_value_t<_Iter>, iter_value_t<_Iter> >;
5152
constexpr auto __default_proj = __is_identity<_Proj>::value;
5253
constexpr auto __integral_value = is_integral_v<iter_value_t<_Iter>>;
5354
constexpr auto __integral_projection = __default_proj && __integral_value;

0 commit comments

Comments
 (0)