[Development] QML: Why C++11 scoped enums are not scoped in QML?
thiago.macieira at intel.com
Tue Jul 26 18:35:58 CEST 2016
Em terça-feira, 26 de julho de 2016, às 17:41:01 PDT, Giuseppe D'Angelo
> On Tue, Jul 26, 2016 at 5:33 PM, Thiago Macieira
> <thiago.macieira at intel.com> wrote:
> > This is all the engine sees. It's an enum.
> But moc might help in this, extracting the relevant information
> alongside the enum's metadata.
> Also if std::is_enum<E>::value is true and std::is_convertible<E,
> typename std::underlying_type<T>::type>::value is false, then the enum
> is scoped. (Surely in C++something this might break if user-provided
> conversions get allowed, but for now it's enough).
I'd still say this should be an opt-in feature for the QML engine that should
not be required to depend on the type of C++ enum used to back it.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development