From 9f736d782c051f6d6dbe7cb472d4794a28f74551 Mon Sep 17 00:00:00 2001 From: konrad Date: Wed, 11 Jan 2023 22:41:29 +0100 Subject: AK: Patch `ArbitrarySizedEnum` operators for missing constructor Patch kindly provided by Ali on #aarch64 on Discord. Co-authored-by: Ali Mohammad Pur --- AK/ArbitrarySizedEnum.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'AK/ArbitrarySizedEnum.h') diff --git a/AK/ArbitrarySizedEnum.h b/AK/ArbitrarySizedEnum.h index c9a4d0c5cb..df685f95e7 100644 --- a/AK/ArbitrarySizedEnum.h +++ b/AK/ArbitrarySizedEnum.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace AK { @@ -66,22 +67,22 @@ struct ArbitrarySizedEnum : public T { [[nodiscard]] constexpr ArbitrarySizedEnum operator|(ArbitrarySizedEnum const& other) const { - return { T(this->value() | other.value()), {} }; + return { T(this->value() | other.value()), Badge> {} }; } [[nodiscard]] constexpr ArbitrarySizedEnum operator&(ArbitrarySizedEnum const& other) const { - return { T(this->value() & other.value()), {} }; + return { T(this->value() & other.value()), Badge> {} }; } [[nodiscard]] constexpr ArbitrarySizedEnum operator^(ArbitrarySizedEnum const& other) const { - return { T(this->value() ^ other.value()), {} }; + return { T(this->value() ^ other.value()), Badge> {} }; } [[nodiscard]] constexpr ArbitrarySizedEnum operator~() const { - return { T(~this->value()), {} }; + return { T(~this->value()), Badge> {} }; } constexpr ArbitrarySizedEnum& operator|=(ArbitrarySizedEnum const& other) -- cgit v1.2.3