Issue |
133208
|
Summary |
template instantiation from dependent function parameter should be ill-formed.
|
Labels |
clang:frontend
|
Assignees |
|
Reporter |
changkhothuychung
|
Given this code
```cpp
template <int num> struct S {};
auto f(auto num) -> S<num> {}
```
gcc fails to compile, and clang succeeds. It looks like this should be a compile error, as template parameters needs arguments to be constant expressions?
Link to compiler explorer - https://godbolt.org/z/va3bao6cW
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs