llvm / llvm/llvm-project

Clang wrongfully allows NTTP with private destructors

Open
#202,017 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.