Clang: Erroneous behavior on windows

Yes, Sebastian’s workaround compiles fine.

Indeed, the compatibility flags do not mitigate the problem.

Daniel

The issue appears to be that Clang gives the lambda’s operator() a __cdecl
calling convention instead of the default member __thiscall calling
convention.

With MSVC compatibility turned on, we should be generating an
operator() for every calling convention for non-capturing lambdas.>

>http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx
>http://blogs.msdn.com/b/oldnewthing/archive/2015/02/20/10594680.aspx