util/IntrusiveList: use std::is_base_of_v

This commit is contained in:
Max Kellermann 2022-06-13 20:21:29 +02:00 committed by Max Kellermann
parent cca20fec07
commit 5140eaa5e7

View File

@ -245,7 +245,7 @@ public:
} }
~IntrusiveList() noexcept { ~IntrusiveList() noexcept {
if constexpr (std::is_base_of<SafeLinkIntrusiveListHook, T>::value) if constexpr (std::is_base_of_v<SafeLinkIntrusiveListHook, T>)
clear(); clear();
} }
@ -288,7 +288,7 @@ public:
} }
void clear() noexcept { void clear() noexcept {
if constexpr (std::is_base_of<SafeLinkIntrusiveListHook, T>::value) { if constexpr (std::is_base_of_v<SafeLinkIntrusiveListHook, T>) {
/* for SafeLinkIntrusiveListHook, we need to /* for SafeLinkIntrusiveListHook, we need to
remove each item manually, or else its remove each item manually, or else its
is_linked() method will not work */ is_linked() method will not work */