URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist42.C] - Rev 693
Compare with Previous | Blame | View Log
// { dg-options -std=c++0x }
enum Unscoped { };
enum class Scoped { };
Unscoped bar(Unscoped x) { return x; }
Scoped bar(Scoped x) { return x; }
auto var1u = bar(Unscoped()); // OK
auto var1s = bar(Scoped()); // OK
auto var2u = bar(Unscoped{}); // #1 Error, but should work
auto var2s = bar(Scoped{}); // #2 Error, but should work