From 9cf1c382dfea3cc2cd22d527b118c6eb1fbf97fb Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 1 Feb 2022 03:11:59 +0330 Subject: [PATCH] AK: Replace 'consteval' with 'constexpr' in some Variant helpers CLion and/or clangd didn't like the consteval and highlighted visit() as an error, just replace it with constexpr as it makes no difference here. --- AK/Variant.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Variant.h b/AK/Variant.h index e620df5476c..63cc349d193 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -81,7 +81,7 @@ struct Variant { template struct VisitImpl { template - static consteval bool has_explicitly_named_overload() + static constexpr bool has_explicitly_named_overload() { // If we're not allowed to make a member function pointer and call it directly (without explicitly resolving it), // we have a templated function on our hands (or a function overload set). @@ -90,7 +90,7 @@ struct VisitImpl { } template - static consteval bool should_invoke_const_overload(IndexSequence) + static constexpr bool should_invoke_const_overload(IndexSequence) { // Scan over all the different visitor functions, if none of them are suitable for calling with `T const&`, avoid calling that first. return ((has_explicitly_named_overload>()) || ...);