| Issue |
165988
|
| Summary |
Clang++ crashes when instantiating a particular class with a static constexpr data member.
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
cassioneri
|
This code makes clang++ to crash:
```
template <typename>
struct S {
static constexpr char c{};
static constexpr decltype(&c) p = nullptr;
};
auto f() {
return S<int>::p;
}
```
GCC and MSVC have no issue to compile the code.
https://godbolt.org/z/edr4h4v99
If instead of being deduced, the type of `S::p` or the return type of `f` is explicitly given (`const char*`), then compilation succeeds.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs