| Issue |
160497
|
| Summary |
`decltype`ing static data member template of class template specified with `auto` won't be resolved
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
yaito3014
|
Following valid C++ code won't compile:
```cpp
template<class>
struct S {
template<class>
inline static auto mem = 42;
};
using T = decltype(S<void>::mem<void>);
T y = 42;
int main() {}
```
Errors are as follows:
```
source.cpp:9:3: error: cannot initialize a variable of type 'T' (aka 'auto') with an rvalue of type 'int'
9 | T y = 42;
| ^ ~~
1 error generated.
```
This may be related to #56652, since it appears that the Clang frontend does not resolve the auto type, leaving code generation to handle an undeduced type.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs