Re: [Development] Use QMetaEnum::keyCount() to initialise array

2018-12-31 Thread Marco Bubke
Is it not nice to share your knowledge why it is not possible? 😉 Is it because the meta type information could be created later? What about adding a constexpr version like: QMetaEnum::compileTimeFromType? Or do we wait for static reflections? From: Development

Re: [Development] Use QMetaEnum::keyCount() to initialise array

2018-12-31 Thread Thiago Macieira
On Sunday, 30 December 2018 17:43:21 -02 Tom Isaacson wrote: > Is it possible to use QMetaEnum::keyCount() to initialise an array? > Something like: > > const QMetaEnum metaEnum = QMetaEnum::fromType(); > int MyArray[metaEnum.keyCount()]; Yes. This should compile with GCC and Clang. It us