1
1
/*
2
- * Copyright (c) 2016-2020 Morwenn
2
+ * Copyright (c) 2016-2025 Morwenn
3
3
* SPDX-License-Identifier: MIT
4
4
*/
5
5
#ifndef CPPSORT_DETAIL_THREE_WAY_COMPARE_H_
@@ -83,7 +83,7 @@ namespace detail
83
83
{
84
84
public:
85
85
86
- constexpr three_way_compare (Compare compare):
86
+ constexpr explicit three_way_compare (Compare compare):
87
87
compare(std::move(compare))
88
88
{}
89
89
@@ -102,7 +102,7 @@ namespace detail
102
102
struct three_way_compare <Compare, true >:
103
103
three_way_compare_base<three_way_compare<Compare>>
104
104
{
105
- constexpr three_way_compare (Compare) {}
105
+ constexpr explicit three_way_compare (Compare) {}
106
106
107
107
using three_way_compare_base<three_way_compare<Compare>>::operator ();
108
108
@@ -118,7 +118,7 @@ namespace detail
118
118
struct three_way_compare <std::less<>, true >:
119
119
three_way_compare_base<three_way_compare<std::less<>>>
120
120
{
121
- constexpr three_way_compare (std::less<>) {}
121
+ constexpr explicit three_way_compare (std::less<>) {}
122
122
123
123
using three_way_compare_base<three_way_compare<std::less<>>>::operator ();
124
124
@@ -146,7 +146,7 @@ namespace detail
146
146
struct three_way_compare <std::ranges::less, true >:
147
147
three_way_compare_base<three_way_compare<std::ranges::less>>
148
148
{
149
- constexpr three_way_compare (std::ranges::less) {}
149
+ constexpr explicit three_way_compare (std::ranges::less) {}
150
150
151
151
using three_way_compare_base<three_way_compare<std::ranges::less>>::operator ();
152
152
@@ -174,7 +174,7 @@ namespace detail
174
174
struct three_way_compare <std::greater<>, true >:
175
175
three_way_compare_base<three_way_compare<std::greater<>>>
176
176
{
177
- constexpr three_way_compare (std::greater<>) {}
177
+ constexpr explicit three_way_compare (std::greater<>) {}
178
178
179
179
using three_way_compare_base<three_way_compare<std::greater<>>>::operator ();
180
180
@@ -203,7 +203,7 @@ namespace detail
203
203
struct three_way_compare <std::ranges::greater, true >:
204
204
three_way_compare_base<three_way_compare<std::ranges::greater>>
205
205
{
206
- constexpr three_way_compare (std::ranges::greater) {}
206
+ constexpr explicit three_way_compare (std::ranges::greater) {}
207
207
208
208
using three_way_compare_base<three_way_compare<std::ranges::greater>>::operator ();
209
209
0 commit comments