Using shift operator in enums not working
this kind of code worked fine in Qt 5.4 but doesn't compile in 5.5. Is that a bug or is there a reason that this isn't supposed to work?
I get an error: qt_getEnumMetaObject: none of the 5 overloads could convert all the argument types
Code:
#include <QCoreApplication>
#include <QDebug>
enum {
test1 = 0
};
enum {
sun = (1 << test1)
};
enum {
bla = (1 << sun)
};
int main(int argc, char *argv[])
{
qDebug() << "test";
return a.exec();
}
Re: Using shift operator in enums not working
That doesn't look Qt related at all.
Do you still get the problem if you have an empty main()?
Cheers,
_
Re: Using shift operator in enums not working
The error looks Qt-related, but it almost certainly has nothing to do with the code that was posted.