[clang] a9d11f9 - [clang][NFC] Mark CWG730 as implemented and add a test (#197186)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 12 13:56:33 PDT 2026
Author: Victor Chernyakin
Date: 2026-05-12T20:56:28Z
New Revision: a9d11f940560f02a609ba3f766933946c2da3842
URL: https://github.com/llvm/llvm-project/commit/a9d11f940560f02a609ba3f766933946c2da3842
DIFF: https://github.com/llvm/llvm-project/commit/a9d11f940560f02a609ba3f766933946c2da3842.diff
LOG: [clang][NFC] Mark CWG730 as implemented and add a test (#197186)
[CWG730](https://wg21.link/cwg730) clarifies that it's allowed to
specialize templates that are members of a non-template class. Clang
implements this since 2.7: https://godbolt.org/z/bWzb766rz
Added:
Modified:
clang/test/CXX/drs/cwg7xx.cpp
clang/www/cxx_dr_status.html
Removed:
################################################################################
diff --git a/clang/test/CXX/drs/cwg7xx.cpp b/clang/test/CXX/drs/cwg7xx.cpp
index 09869128f6054..03a1cf1e73469 100644
--- a/clang/test/CXX/drs/cwg7xx.cpp
+++ b/clang/test/CXX/drs/cwg7xx.cpp
@@ -335,6 +335,16 @@ namespace cwg727 { // cwg727: partial
Collision<int, int> c; // #cwg727-Collision-int-int
} // namespace cwg727
+namespace cwg730 { // cwg730: 2.7
+struct A {
+ template <typename> struct S {};
+ template <typename> void f() {}
+};
+
+template <> struct A::S<int> {};
+template <> void A::f<int>() {}
+} // namespace cwg730
+
namespace cwg743 { // cwg743: 3.1
#if __cplusplus >= 201103L
struct S {
diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html
index 842c91a346c3c..8663e224ee6ce 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -5139,7 +5139,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td>[<a href="https://wg21.link/temp.expl.spec">temp.expl.spec</a>]</td>
<td>CD2</td>
<td>Explicit specializations of members of non-template classes</td>
- <td class="unknown" align="center">Unknown</td>
+ <td class="full" align="center">Clang 2.7</td>
</tr>
<tr id="731">
<td><a href="https://cplusplus.github.io/CWG/issues/731.html">731</a></td>
More information about the cfe-commits
mailing list