OSDN Git Service

2012-12-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / initlist42.C
1 // { dg-options -std=c++0x }
2
3 enum Unscoped { };
4 enum class Scoped { };
5
6 Unscoped bar(Unscoped x) { return x; }
7 Scoped bar(Scoped x) { return x; }
8
9 auto var1u = bar(Unscoped()); // OK
10 auto var1s = bar(Scoped()); // OK
11
12 auto var2u = bar(Unscoped{}); // #1 Error, but should work
13 auto var2s = bar(Scoped{}); // #2 Error, but should work