blob: dfa286b6e6e5d03a6377ddc06a49609e28dbc55b [file] [log] [blame]
// C++26 P1306R5 - Expansion statements
// { dg-do compile { target c++11 } }
// { dg-options "" }
int a;
long b;
void
foo ()
{
template for (auto g : { &a, &b, 2L, &a }) // { dg-warning "'template for' only available with" "" { target c++23_down } }
{ // { dg-message "required from here" "" { target *-*-* } .-1 }
decltype (*g) h = *g; // { dg-error "invalid type argument of unary" }
}
}
// { dg-message "In instantiation of 'template for' iteration 3:" "" { target *-*-* } 0 }