On 19/12/2018 11:09, Tom Isaacson wrote:
Is it possible to use QMetaEnum::keyCount() to initialise an array?
Something like:
const QMetaEnum metaEnum = QMetaEnum::fromType<MyArray>();
int MyArray[metaEnum.keyCount()];
It seems like Q_ENUM declares functions with Q_DECL_CONSTEXPR in C++11
but I can't figure out how to get this to work.
Are you sure they're constexpr? From what I can see in Qt 5.12,
keyCount() is not constexpr. It's just const.
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest