util/IntrusiveList: convert static_assert to concept check

This commit is contained in:
Max Kellermann 2023-11-06 12:39:26 +01:00 committed by Max Kellermann
parent 73708e7be7
commit ebf1fc7ca4

View File

@ -72,9 +72,8 @@ public:
siblings.next = nullptr; siblings.next = nullptr;
} }
bool is_linked() const noexcept { bool is_linked() const noexcept
static_assert(mode >= IntrusiveHookMode::TRACK); requires(mode >= IntrusiveHookMode::TRACK) {
return siblings.next != nullptr; return siblings.next != nullptr;
} }