Why is this code (ideone) not allowed? What would be the workaround?
enum testEnum { e1, e2 };
testEnum te = e1 | e2;
error: invalid conversion from 'int' to 'main()::testEnum'
Why is this code (ideone) not allowed? What would be the workaround?
enum testEnum { e1, e2 };
testEnum te = e1 | e2;
error: invalid conversion from 'int' to 'main()::testEnum'