Skip to content

Commit faf31ee

Browse files
committed
test back with only invocable
1 parent 701e6c0 commit faf31ee

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

src/hotspot/share/utilities/rbTree.hpp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,26 @@ class AbstractRBTree {
211211

212212
// static constexpr bool HasNodeVerifier = HasNodeVerifierImpl<COMPARATOR>;
213213

214-
template<typename, typename = void>
215-
struct has_node_verifier : std::false_type { };
214+
// template<typename, typename = void>
215+
// struct has_node_verifier : std::false_type { };
216216

217-
template <typename CMP>
218-
struct has_node_verifier<CMP, std::void_t<decltype(&CMP::less_than)>> // detected
219-
: std::bool_constant<std::is_invocable_r_v<
220-
bool, decltype(&CMP::less_than), const NodeType *, const NodeType *>> {
221-
};
217+
// template <typename CMP>
218+
// struct has_node_verifier<CMP, std::void_t<decltype(&CMP::less_than)>>
219+
// : std::bool_constant<std::is_invocable_r_v<
220+
// bool, decltype(&CMP::less_than), const NodeType *, const NodeType *>> {
221+
// };
222+
223+
// static constexpr bool HasNodeVerifier = has_node_verifier<COMPARATOR>::value;
224+
225+
template <typename /*T*/, typename = void>
226+
static constexpr bool has_node_verifier_v = false;
227+
228+
template <typename CMP>
229+
static constexpr bool has_node_verifier_v<CMP, std::void_t<decltype(&CMP::less_than)>> =
230+
std::is_invocable_r_v<bool, decltype(&CMP::less_than), const NodeType*, const NodeType*>;
231+
232+
static constexpr bool HasNodeVerifier = has_node_verifier_v<COMPARATOR>;
222233

223-
static constexpr bool HasNodeVerifier = has_node_verifier<COMPARATOR>::value;
224234

225235
RBTreeOrdering cmp(const K &a, const NodeType *b) const {
226236
if constexpr (HasNodeComparator) {

0 commit comments

Comments
 (0)