From 4566387ba5bc6f8b0907a1e5fb3f097435b89d0f Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Wed, 14 Jul 2021 22:07:05 +0200 Subject: [PATCH] AK: Add workaround for clang-format 12 problems with concepts --- AK/StdLibExtras.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 30a23b65bd..d93ff3834c 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -16,6 +16,10 @@ constexpr auto round_up_to_power_of_two(T value, U power_of_two) requires(IsInte return ((value - 1) & ~(power_of_two - 1)) + power_of_two; } +// HACK: clang-format does not format this correctly because of the requires clause above. +// Disabling formatting for that doesn't help either. +// +// clang-format off namespace std { // NOTE: This is in the "std" namespace since some compiler features rely on it. @@ -27,6 +31,7 @@ constexpr T&& move(T& arg) } } +// clang-format on using std::move;