================
@@ -189,6 +189,11 @@ namespace ModifyingCapture {
     [=] {
       n = 1; // expected-error {{cannot assign to a variable captured by copy 
in a non-mutable lambda}}
     };
+    const int cn = 0;
+    // cxx03-cxx11-warning@+1 {{initialized lambda captures are a C++14 
extension}}
+    [&cnr = cn]{ // expected-note {{variable 'cnr' declared const here}}
----------------
Endilll wrote:

I'm not sure we want to go this far and look through _explicit_ declarations 
with deduced type.
CC @cor3ntin 

https://github.com/llvm/llvm-project/pull/105647
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to