util/IntrusiveList: use std::is_base_of_v
This commit is contained in:
parent
cca20fec07
commit
5140eaa5e7
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user