PR c++/85462
[official-gcc.git] / gcc / testsuite / g++.dg / expr / cond2.C
blob68a26a22f34ff0e9f1ef9be06f4dbe6d198bced0
1 struct Term { };
2 struct Boolean : Term {
3   explicit Boolean(bool);
4 };
5 struct IsZero : Term {
6   Term *eval();
7 };
8 Term*
9 IsZero::eval()
11   return true ? new Boolean(false) : this; // { dg-error "conditional expression" }