rupprecht wrote:

Thanks to @MaskRay for handling the revert.

A reduction for the second `typename` breakage looks similar, so may be the 
same underlying issue. But here it is anyway, in case it ends up being a second 
bug in the patch:

```c++
class Foo {};

template <class T>
struct Ptr {};

template <class X, class Y = void>
class Data;

template <class Unused>
struct Data<Foo, Unused> {
  using Type = int;
  void func();
};

template <class T>
using Alias = Data<Foo, T>;

template <class T>
void Alias<T>::func() {
  auto x = Ptr<Alias<T>::Type>();
  (void)x;
}
```

Results in:

```c++
<source>:20:16: error: template argument for template type parameter must be a 
type; did you forget 'typename'?
   20 |   auto x = Ptr<Alias<T>::Type>();
      |                ^
      |                typename 
```

Live link, until compiler explorer catches up to the revert: 
https://godbolt.org/z/zvT4jzqbv

I'd be happy to just add `typename` in this case if the language says it's 
supposed to be necessary here, but I'd be just as happy to not need to make any 
code changes :)

https://github.com/llvm/llvm-project/pull/75069
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to