* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / scoped_enum_examples.C
blob8dc2fa647995eb7e1051bd90e0a4ea845943f796
1 // { dg-do compile { target c++11 } }
2 enum class Col { red, yellow, green };
3                                 
4 int x = Col::red; // { dg-error "cannot convert" }
5 Col y = Col::red;
6            
7 void f()
8 {                     
9   if (y) { } // { dg-error "could not convert" }
12 enum direction { left='l', right='r' };
13 void g() {
14                                 // OK
15   direction d;
16                                 // OK
17   d = left;
18                                 // OK
19   d = direction::right;
21 enum class altitude { high='h', low='l' };
22 void h() {
23   altitude a;
24   a = high;                     // { dg-error "not declared in this scope" }
25   a = altitude::low;