PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / overload / defarg10.C
blobb8275d60453aab63c376acbfc4f7fb26e514272c
1 // PR c++/58063
2 // { dg-do run }
4 struct basic_ios
6   bool operator!() const { return false; }
7 };
9 struct ostream : virtual basic_ios
13 int i;
15 ostream& operator<<(ostream& os, const char* s) {
16   ++i;
17   return os;
20 ostream cout;
22 void f(bool x = !(cout << "hi!\n")) { }
24 int main() {
25   f();
26   if (i != 1)
27     __builtin_abort();