From ebf1fc7ca4dc379e9bdbf713edaf639f21b1609c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 6 Nov 2023 12:39:26 +0100 Subject: [PATCH] util/IntrusiveList: convert static_assert to concept check --- src/util/IntrusiveList.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/IntrusiveList.hxx b/src/util/IntrusiveList.hxx index 99bb211e2..23715d11f 100644 --- a/src/util/IntrusiveList.hxx +++ b/src/util/IntrusiveList.hxx @@ -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; }