function2 icon indicating copy to clipboard operation
function2 copied to clipboard

chore: silence Visual Studio 2022 (17.3.0) warning

Open gjasny opened this issue 3 years ago • 0 comments

Starting with Visual Studio 2022 (17.3.0) the following warning is emitted:

include\function2\function2.hpp(1176): warning C4305: '<function-style-cast>': truncation from 'bool (__cdecl *)(void)' to 'bool'

Neither bool(callable) (as it was written), nor static_cast<bool>(callable) seem to make the compiler happy. It worked with either !! or omitting it completely.

@Naios

gjasny avatar Aug 16 '22 07:08 gjasny