https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120990
--- Comment #4 from Rohan Suri <rohan.a.suri at gmail dot com> --- Thanks for looking into it Andrew. Good to know that those compiler flags do catch it. > I am not sure if a warning is even wanted here. This is just one bad symptoms > of std::function. I don't know if GCC can be selective about it and turn on particular cases of -Wconversion inside of system headers. I thought of reporting it because I didn't expect a silent conversion to happen and it certainly threw me off. I checked the situation with other compilers and Clang also doesn't report it (even with -Weverything), while MSVC reports it by default.