This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Jan 2018 20:09:14 +0000
- Subject: [Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type
- Auto-submitted: auto-generated
- References: <bug-83739-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
Without fancy tools, looking at the last few lines of the file:
#include <set>
template <bool> void f()
{
std::set<unsigned> x;
auto delegate = [](auto & foo)
{
for (auto bar : foo);
};
delegate(x);
}
int main() {
f<true>();
}