[clang] [clang-tools-extra] [clang] Implement CWG2413 (implicit `typename` in conversion operators) (PR #195207)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 10:24:02 PDT 2026


================
@@ -8,6 +8,16 @@
 
 // cwg2406 is in cwg2406.cpp
 
+namespace cwg2413 { // cwg2413: 23
+#if __cplusplus >= 202002L
+template <typename T>
+struct S {
+  operator T::R();
+  void f() { operator T::R(); }
----------------
Endilll wrote:

> The paper wasn't a DR, but the CWG2413 itself was

No, that's not how it works. If you look at straw polls in [N4877](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/n4877.pdf), the first Core motion reads "Accept as Defect Reports and apply the proposed resolutions". You can compare it with the motion 5 (for P1787R6), which lacks the part about defect report — hence it's not a defect report.

https://github.com/llvm/llvm-project/pull/195207


More information about the cfe-commits mailing list