[clang][NFC] Mark CWG941 as implemented and add a test (#197202)

[CWG941](https://wg21.link/cwg941) allowed specializing deleted function
templates. Clang accepted this between 2.7 and 2.9, regressed and
started emitting redefinition errors between 3.0 and 3.8, then went back
to accepting in 3.9: https://godbolt.org/z/GKnf9je7j. I've marked it as
implemented since 3.9.
This commit is contained in:
Victor Chernyakin 2026-05-12 15:07:54 -07:00 committed by GitHub
parent 2cb2dd4352
commit c0792f37be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 1 deletions

View file

@ -22,6 +22,34 @@ static_assert(alignof(int[][2]) == alignof(int[2]), "");
#endif
} // namespace cwg930
namespace cwg941 { // cwg941: 3.9
#if __cplusplus >= 201103L
template <typename>
void f() = delete;
template<> void f<int>() {}
template <typename>
struct A {
void f() = delete;
template <typename>
void g() = delete;
};
template<> void A<int>::f() {}
template<> template<> void A<int>::g<int>() {}
struct B {
template <typename>
void f() = delete;
};
template<> void B::f<int>() {}
#endif
} // namespace cwg941
namespace cwg948 { // cwg948: 3.7
#if __cplusplus >= 201103L
class A {

View file

@ -6364,7 +6364,7 @@
<td>[<a href="https://wg21.link/temp.expl.spec">temp.expl.spec</a>]</td>
<td>C++11</td>
<td>Explicit specialization of deleted function template</td>
<td class="unknown" align="center">Unknown</td>
<td class="full" align="center">Clang 3.9</td>
</tr>
<tr id="942">
<td><a href="https://cplusplus.github.io/CWG/issues/942.html">942</a></td>