Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/range-for39.C

raw
1 // PR c++/119073
2 // { dg-do compile { target c++11 } }
3
4 struct A { ~A (); };
5 struct B { B (const A &a = A ()); int *begin (); int *end (); ~B (); };
6
7 void
8 foo (bool x)
9 {
10 for (auto i : (x ? B{} : B{}))
11 ;
12 }