https://bugs.llvm.org/show_bug.cgi?id=20717

NODA, Kai <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |[email protected]

--- Comment #1 from NODA, Kai <[email protected]> ---
As of today, clang trunk@306691 can correctly reject the test case with
-std=c++14 or 1z:

/tmp/m.cpp:2:39: error: cannot assign to a variable captured by copy in a
non-mutable lambda
  auto x = [i = 0](auto n) { return i += n; }(1);
                                    ~ ^
/tmp/m.cpp:2:46: note: in instantiation of function template specialization
'main()::(anonymous class)::operator()<int>' requested here
  auto x = [i = 0](auto n) { return i += n; }(1);
                                             ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to