llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Victor Chernyakin (localspook)

<details>
<summary>Changes</summary>

[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

---
Full diff: https://github.com/llvm/llvm-project/pull/197186.diff


2 Files Affected:

- (modified) clang/test/CXX/drs/cwg7xx.cpp (+10) 
- (modified) clang/www/cxx_dr_status.html (+1-1) 


``````````diff
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>

``````````

</details>


https://github.com/llvm/llvm-project/pull/197186
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to