Clang: Erroneous behavior on windows

Yes, Sebastian’s workaround compiles fine.

Indeed, the compatibility flags do not mitigate the problem.


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

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