[clang] [clang-tools-extra] [lldb] [clang] implement CWG1558 and CWG2064: instantiation-dependency improvements (PR #190495)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 07:15:51 PDT 2026


================
@@ -64,6 +64,19 @@ namespace cwg2061 { // cwg2061: 2.7
 #endif // C++11
 } // namespace cwg2061
 
+namespace cwg2064 { // cwg2064: 23
+#if __cplusplus >= 201103L
+  template<typename T> struct X {
+    template<typename U> struct Y {};
+  };
+  template<typename T> void g() {
+    X<decltype(sizeof(T))>::Y<int> y; // ok
+    return X<decltype(sizeof(T))>::f();
+    // expected-error at -1 {{no member named 'f' in 'cwg2064::X<unsigned long>'}}
----------------
mizvekov wrote:

The decltype isn't dependent anymore.

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


More information about the cfe-commits mailing list