This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type


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>();
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]