https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107858

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|Variable in generic lambda  |structed binding with auto
                   |incorrectly considered to   |type and for all loop in a
                   |be a dependent name         |template considered a type
                   |                            |dependent name
   Last reconfirmed|                            |2022-11-24

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is unrelated to generic lambdas and can reproduce with just a templated
function:
```
struct y
{
  template<int>
  void foo() const {}
};

template<typename T>
struct pair
{
  T a, b;
};

template<class t>
void bar(void)
{
    pair<y> x[10];
    for (auto const &[a, b] : x)
      a.foo<0>();
}
```

Note the forall loop is required.
I wonder if that is because begin and end are considered type depdent ...
But not using structured binding, GCC does not considered them as type depdent.
Confirmed.

Reply via email to