[llvm-bugs] [Bug 39911] Lambda call operator invoked if streamed to std::cout

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 7 08:21:30 PST 2018


hstong at ca.ibm.com changed:

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

--- Comment #3 from hstong at ca.ibm.com ---
> The code works as expected with gcc and msvc, so I guess it's a clang problem.
ICC and MSVC behave the same as Clang here:
ICC: https://godbolt.org/z/nncyHU
MSVC: https://godbolt.org/z/U7k7zj

GCC behaves the same if the lambda parameter is declared as `auto &` to better
match the function-to-pointer parameter types:

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181207/c85df1c7/attachment.html>

More information about the llvm-bugs mailing list