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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #0)
> template<class>
> struct B;
> 
> template <class R, class... Args>
> struct B<R(Args...)> {
>   template<class T>
>   struct C { C(T); };
> };
> 
> int main() {
>   B<void(int)>::C{0};
> }
> 
> https://godbolt.org/z/h1jGhc5b4

In fact, if we add CATD for inner class C, it should be well-formed.

template<class>
struct B;

template <class R, class... Args>
struct B<R(Args...)> {
  template<class T>
  struct C { C(T); };
  template<class T>
  C(T) -> C<T>;
};

int main() {
  B<void()>::C c{0};
}

https://godbolt.org/z/E35rj1YP5

Reply via email to