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
1 changed files with 2 additions and 3 deletions

View File

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