diff --git a/src/Globals.h b/src/Globals.h index 13e793259..3b6575860 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -145,14 +145,10 @@ typedef unsigned char Byte; typedef Byte ColourID; -// If you get an error about specialization check the size of integral types -template -class SizeChecker; - template -class SizeChecker +class SizeChecker { - T v; + static_assert(sizeof(T) == Size, "Check the size of integral types"); }; template class SizeChecker;