Clang wrongfully allows NTTP with private destructors
Open
clang:frontend
diverges-from:gcc
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```cpp
class foo
{
~foo() = default;
};
template
void bar() {
}
int main() {
bar();
}
```
GCC rejects this code, while Clang accepts it.
Godbolt link: https://godbolt.org/z/31jrGvj7Y
Contributor guide
Assessment
This issue has not been assessed yet.