C++ Comparing lambdas

The other day I researched some tiny framework of mine, and I bumped into this problem.  In my Visual Studio 2017 MSVC IDE.

MSVC error when comparing two lambdas
MSVC error when comparing two lambdas

Ok here we have two lambdas which are supposed to be the same but (very slightly) differently declared. But IDE refused to allow me to do static_assert() for comparing them for equality. With errors as on the picture.

Of which texts is obviously not very logical to humans. Is this MSVC error of ISO C++ forbids this ?

Leave a Reply