AK: Move Empty into StdLibExtras.h

This commit is contained in:
Hendiadyoin1
2025-03-02 16:32:45 +01:00
committed by Nico Weber
parent ef37e1efc6
commit 920b840a08
2 changed files with 5 additions and 5 deletions

View File

@@ -53,6 +53,10 @@ struct _RawPtr {
namespace AK {
struct Empty {
constexpr bool operator==(Empty const&) const = default;
};
template<typename T, typename SizeType = decltype(sizeof(T)), SizeType N>
constexpr SizeType array_size(T (&)[N])
{
@@ -194,6 +198,7 @@ __DEFINE_GENERIC_ABS(long double, 0.0L, fabsl);
using AK::array_size;
using AK::ceil_div;
using AK::clamp;
using AK::Empty;
using AK::exchange;
using AK::floor_div;
using AK::forward;

View File

@@ -216,10 +216,6 @@ using MergeAndDeduplicatePacks = InheritFromPacks<MakeIndexSequence<sizeof...(Ps
namespace AK {
struct Empty {
constexpr bool operator==(Empty const&) const = default;
};
template<typename T>
concept NotLvalueReference = !IsLvalueReference<T>;
@@ -522,6 +518,5 @@ struct TypeList<Variant<Ts...>> : TypeList<Ts...> { };
}
#if USING_AK_GLOBALLY
using AK::Empty;
using AK::Variant;
#endif