An int is not enough to hold all values of a 64-bit enum, so
don't allow to compile QFlags for such enums.
Change-Id: Ia291c4a5e2160dfd6d5a35e61a7f71ab571b9d9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
template<typename Enum>
class QFlags
{
+ Q_STATIC_ASSERT_X((sizeof(Enum) <= sizeof(int)),
+ "QFlags uses an int as storage, so an enum with underlying "
+ "long long would overflow. Qt 5.1 will have support for 64bit enums.");
struct Private;
typedef int (Private::*Zero);
int i;