Potatoswatter
Potatoswatter

Reputation: 137870

Explicitly specializing a deleted primary template

GCC accepts this but Clang rejects it as a redefinition:

template< typename >
void s() = delete;

template<>
void s< int >() {}

Who is right?

Upvotes: 4

Views: 56

Answers (1)

Potatoswatter
Potatoswatter

Reputation: 137870

It is a Clang bug and also CWG DR 941, which was already adopted by C++11. Clang is nonconforming.

Upvotes: 4

Related Questions