summaryrefslogtreecommitdiff
path: root/AK/ArbitrarySizedEnum.h
diff options
context:
space:
mode:
authorkonrad <konrad@serenityos.org>2023-01-11 22:41:29 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-01-18 22:58:42 +0100
commit9f736d782c051f6d6dbe7cb472d4794a28f74551 (patch)
treeaf2adc22f4b500038b0fac75ffc43b7ada603cb9 /AK/ArbitrarySizedEnum.h
parent0f81fb03f2b03f93a64baa99381060b071f4058a (diff)
downloadserenity-9f736d782c051f6d6dbe7cb472d4794a28f74551.zip
AK: Patch `ArbitrarySizedEnum` operators for missing constructor
Patch kindly provided by Ali on #aarch64 on Discord. Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
Diffstat (limited to 'AK/ArbitrarySizedEnum.h')
-rw-r--r--AK/ArbitrarySizedEnum.h9
1 files changed, 5 insertions, 4 deletions
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 <AK/Badge.h>
#include <AK/DistinctNumeric.h>
namespace AK {
@@ -66,22 +67,22 @@ struct ArbitrarySizedEnum : public T {
[[nodiscard]] constexpr ArbitrarySizedEnum<T> operator|(ArbitrarySizedEnum<T> const& other) const
{
- return { T(this->value() | other.value()), {} };
+ return { T(this->value() | other.value()), Badge<ArbitrarySizedEnum<T>> {} };
}
[[nodiscard]] constexpr ArbitrarySizedEnum<T> operator&(ArbitrarySizedEnum<T> const& other) const
{
- return { T(this->value() & other.value()), {} };
+ return { T(this->value() & other.value()), Badge<ArbitrarySizedEnum<T>> {} };
}
[[nodiscard]] constexpr ArbitrarySizedEnum<T> operator^(ArbitrarySizedEnum<T> const& other) const
{
- return { T(this->value() ^ other.value()), {} };
+ return { T(this->value() ^ other.value()), Badge<ArbitrarySizedEnum<T>> {} };
}
[[nodiscard]] constexpr ArbitrarySizedEnum<T> operator~() const
{
- return { T(~this->value()), {} };
+ return { T(~this->value()), Badge<ArbitrarySizedEnum<T>> {} };
}
constexpr ArbitrarySizedEnum<T>& operator|=(ArbitrarySizedEnum<T> const& other)