diff --git a/Libraries/LibIPC/Concepts.h b/Libraries/LibIPC/Concepts.h index 6ddfb51f9ad..3fec999d5f1 100644 --- a/Libraries/LibIPC/Concepts.h +++ b/Libraries/LibIPC/Concepts.h @@ -27,54 +27,45 @@ namespace IPC::Concepts { namespace Detail { +// Cannot use SpecializationOf with these templates because they have non-type parameters. See https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1985r3.pdf template -constexpr inline bool IsHashMap = false; -template -constexpr inline bool IsHashMap> = true; - -template -constexpr inline bool IsOptional = false; -template -constexpr inline bool IsOptional> = true; - -template -constexpr inline bool IsSharedSingleProducerCircularQueue = false; -template -constexpr inline bool IsSharedSingleProducerCircularQueue> = true; - -template -constexpr inline bool IsVariant = false; -template -constexpr inline bool IsVariant> = true; - -template -constexpr inline bool IsVector = false; -template -constexpr inline bool IsVector> = true; - -template -constexpr inline bool IsArray = false; +constexpr bool IsArray = false; template -constexpr inline bool IsArray> = true; +constexpr bool IsArray> = true; + +template +constexpr bool IsVector = false; +template +constexpr bool IsVector> = true; + +template +constexpr bool IsHashMap = false; +template +constexpr bool IsHashMap> = true; + +template +constexpr bool IsSharedSingleProducerCircularQueue = false; +template +constexpr bool IsSharedSingleProducerCircularQueue> = true; } template -concept HashMap = Detail::IsHashMap; - -template -concept Optional = Detail::IsOptional; - -template -concept SharedSingleProducerCircularQueue = Detail::IsSharedSingleProducerCircularQueue; - -template -concept Variant = Detail::IsVariant; +concept Array = Detail::IsArray; template concept Vector = Detail::IsVector; template -concept Array = Detail::IsArray; +concept HashMap = Detail::IsHashMap; + +template +concept SharedSingleProducerCircularQueue = Detail::IsSharedSingleProducerCircularQueue; + +template +concept Optional = SpecializationOf; + +template +concept Variant = SpecializationOf; }