llvm / llvm/llvm-project

std::void_t doesn't SFINAE with partial specializations

Open
#190,388 1 comment 0 reactions 1 assignee Claimed by @mizvekov View on GitHub
clang:frontend diverges-from:gcc diverges-from:msvc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Clang doesn't compile this, but MSVC and GCC compile it fine:
```c++
#include

template
struct S;

template
struct S> {};

template
struct S> {};
```
```
:10:8: error: redefinition of 'S>'
10 | struct S> {};
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:7:8: note: previous definition is here
7 | struct S> {};
| ^
```
I'm not entirely sure if this is intentional or not, but per https://cplusplus.github.io/CWG/issues/1558.html it feels like it should work.

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.