]>
Commit | Line | Data |
---|---|---|
4b2e63de | 1 | // { dg-do compile { target c++11 } } |
1c53d72b JM |
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 |