diff --git a/AK/Concepts.h b/AK/Concepts.h index 5394fe6ab8b..f7e4de9aee5 100644 --- a/AK/Concepts.h +++ b/AK/Concepts.h @@ -11,8 +11,6 @@ namespace AK::Concepts { -#if defined(__cpp_concepts) && !defined(__COVERITY__) - template concept Integral = IsIntegral; @@ -31,13 +29,15 @@ concept Unsigned = IsUnsigned; template concept SameAs = IsSame; +// FIXME: remove once Clang formats these properly. +// clang-format off template concept VoidFunction = requires(Func func, Args... args) { { func(args...) } - ->SameAs; + -> SameAs; }; template @@ -46,15 +46,11 @@ concept IteratorFunction = requires(Func func, Args... args) { func(args...) } - ->SameAs; + -> SameAs; }; - -#endif - +// clang-format on } -#if defined(__cpp_concepts) && !defined(__COVERITY__) - using AK::Concepts::Arithmetic; using AK::Concepts::FloatingPoint; using AK::Concepts::Integral; @@ -62,5 +58,3 @@ using AK::Concepts::IteratorFunction; using AK::Concepts::Signed; using AK::Concepts::Unsigned; using AK::Concepts::VoidFunction; - -#endif diff --git a/AK/Userspace.h b/AK/Userspace.h index ae5a5103598..04bc1236541 100644 --- a/AK/Userspace.h +++ b/AK/Userspace.h @@ -12,16 +12,10 @@ namespace AK { -// HACK: This is just here to make syntax highlighting work in Qt Creator. -// Once it supports C++20 concepts, we can remove this. -#if defined(__cpp_concepts) && !defined(__COVERITY__) template concept PointerTypeName = IsPointer; -template -#else -template, int>::Type = 0> -#endif +template class Userspace { public: Userspace() = default;