aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-11-21 14:36:16 +0100
committerShauren <shauren.trinity@gmail.com>2019-11-21 14:36:16 +0100
commitad774a8e0e47bb7eb7ec2f148f000ba017d3a0e3 (patch)
treeb1cd89770107f312a7f16ccc357c6ebe412ec31c /src/common/Utilities/Util.h
parent3beb17c452ea6b293675a56fde918016bb68ca60 (diff)
Core/Spells: Make missing spell/aura effect handler assignments a compile time error instead of runtime crash
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r--src/common/Utilities/Util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index 4438bf1863d..f1beb1312cf 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -544,4 +544,14 @@ constexpr typename std::underlying_type<E>::type AsUnderlyingType(E enumValue)
return static_cast<typename std::underlying_type<E>::type>(enumValue);
}
+template<typename T>
+struct NonDefaultConstructible
+{
+ constexpr /*implicit*/ NonDefaultConstructible(T value) : Value(std::move(value))
+ {
+ }
+
+ T Value;
+};
+
#endif