From ad774a8e0e47bb7eb7ec2f148f000ba017d3a0e3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 21 Nov 2019 14:36:16 +0100 Subject: Core/Spells: Make missing spell/aura effect handler assignments a compile time error instead of runtime crash --- src/common/Utilities/Util.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/common') 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::type AsUnderlyingType(E enumValue) return static_cast::type>(enumValue); } +template +struct NonDefaultConstructible +{ + constexpr /*implicit*/ NonDefaultConstructible(T value) : Value(std::move(value)) + { + } + + T Value; +}; + #endif -- cgit v1.2.3