[Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 8 20:11:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739
--- Comment #7 from Marc Glisse <glisse at gcc dot gnu.org> ---
And to drop the includes:
template <bool> void f()
{
int x[2];
auto delegate = [](auto & foo)
{
for (auto bar : foo);
};
delegate(x);
}
int main() {
f<true>();
}
More information about the Gcc-bugs
mailing list