1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

AK: Export Details and Concepts into the AK namespace

AK internals like to use concepts and details without a fully qualified
name, which usually works just fine because we make everything
AK-related available to the unqualified namespace.

However, this breaks as soon as we start not using `USING_AK_GLOBALLY`,
due to those identifiers no longer being made available. Instead, we
just export those into the `AK` namespace instead.
This commit is contained in:
Tim Schumacher 2022-11-27 16:35:35 +01:00 committed by Andreas Kling
parent 458ca83d8c
commit 03fd9002da
2 changed files with 10 additions and 2 deletions

View file

@ -121,7 +121,9 @@ concept FallibleFunction = requires(Func&& func, Args&&... args) {
// clang-format on // clang-format on
} }
#if USING_AK_GLOBALLY #if !USING_AK_GLOBALLY
namespace AK {
#endif
using AK::Concepts::Arithmetic; using AK::Concepts::Arithmetic;
using AK::Concepts::ArrayLike; using AK::Concepts::ArrayLike;
using AK::Concepts::Enum; using AK::Concepts::Enum;
@ -139,4 +141,6 @@ using AK::Concepts::Signed;
using AK::Concepts::SpecializationOf; using AK::Concepts::SpecializationOf;
using AK::Concepts::Unsigned; using AK::Concepts::Unsigned;
using AK::Concepts::VoidFunction; using AK::Concepts::VoidFunction;
#if !USING_AK_GLOBALLY
}
#endif #endif

View file

@ -615,7 +615,9 @@ inline constexpr bool IsOneOfIgnoringCV = (IsSameIgnoringCV<T, Ts> || ...);
} }
#if USING_AK_GLOBALLY #if !USING_AK_GLOBALLY
namespace AK {
#endif
using AK::Detail::AddConst; using AK::Detail::AddConst;
using AK::Detail::AddConstToReferencedType; using AK::Detail::AddConstToReferencedType;
using AK::Detail::AddLvalueReference; using AK::Detail::AddLvalueReference;
@ -685,4 +687,6 @@ using AK::Detail::RemoveVolatile;
using AK::Detail::TrueType; using AK::Detail::TrueType;
using AK::Detail::UnderlyingType; using AK::Detail::UnderlyingType;
using AK::Detail::Void; using AK::Detail::Void;
#if !USING_AK_GLOBALLY
}
#endif #endif