c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-47969.C
blob9ff21578b15dfe73a617a16d5d1951cd33871f2e
1 // PR c++/47969
2 // { dg-do compile { target c++11 } }
4 struct A
6   // constexpr operator int () { return 1; }
7 };
9 constexpr A a = A();
11 int ar[a]; // { dg-error "could not convert" }
12 // { dg-error "8:size of array .ar. has non-integral" "" { target c++11 } .-1 }