Fix PR c++/69139 (deduction failure with trailing return type)
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / desig1.C
blobcc527308f0d7f55574ab330e769dc6ac392fe438
1 // PR c++/58882
2 // { dg-do compile { target c++11 } }
4 struct A
6   constexpr operator int() const { return 0; }
7 };
9 int a[] = { [A()] = 0 };
11 enum E { e0 };
13 struct B
15   constexpr operator E() const { return E::e0; }
18 int b[] = { [B()] = 0 };
20 enum class SE { se0 };
22 struct C
24   constexpr operator SE() const { return SE::se0; }
27 int c[] = { [C()] = 0 }; // { dg-error "integral constant-expression" }