Issue 127565
Summary [Clang] CTAD failure on explicit instantiation of variable template
Labels clang
Assignees
Reporter MagentaTreehouse
    The following C++17 code is accepted by GCC and MSVC, but rejected by Clang.

```c++
template <class T>
struct A { A(T) {} };

template <class>
A a{0};

template A a<int>;
```

Output:
```console
<source>:7:10: error: 'auto' variable template instantiation is not allowed
    7 | template A a<int>;
      | ^
```

See https://compiler-explorer.com/z/PerPhffKG.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to