mirror of
https://github.com/SerenityOS/serenity
synced 2026-04-25 17:15:42 +02:00
AK: Move Empty into StdLibExtras.h
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user