llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Victor Chernyakin (localspook) <details> <summary>Changes</summary> [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. --- Full diff: https://github.com/llvm/llvm-project/pull/197202.diff 2 Files Affected: - (modified) clang/test/CXX/drs/cwg9xx.cpp (+23) - (modified) clang/www/cxx_dr_status.html (+1-1) ``````````diff diff --git a/clang/test/CXX/drs/cwg9xx.cpp b/clang/test/CXX/drs/cwg9xx.cpp index c8fdca3a45c3e..f9efbcfb5ca02 100644 --- a/clang/test/CXX/drs/cwg9xx.cpp +++ b/clang/test/CXX/drs/cwg9xx.cpp @@ -22,6 +22,29 @@ 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<> void A<int>::f() {} + +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 { diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 9f3cd07ea8a4e..10a38509d2763 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -6364,7 +6364,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>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> `````````` </details> https://github.com/llvm/llvm-project/pull/197202 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
