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

Frédéric <ufosp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #6 from Frédéric <ufosp...@gmail.com> ---
OK, I went to the end of this and I am sorry to have disturbed you but it seems
that I was wrong. The thing is that in the same function I had multiple lambdas
referring to a constexpr std::size_t. And for some of them I could remove the
capture and not for the others. So the warning was related to one of the
lambda, and I tried to remove all captures so it did not work.

I now understand that if a lambda uses a constexpr variable in a call with a
const reference, the constexpr must be capture to have a reference at the time
of the call where the reference to the original variable is not accessible.

Thanks for your help.

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

Reply via email to