Skip to content
Advertisement

Tag: compiler-warnings

How to explicitly call the specified overload function?

Like this code, the C++ compiler will convert char* to bool and then call the first function, which is inconsistent with my original intention. Is there any way to prevent the compiler from performing type conversions that I don’t want? Like “-fno-permissive”, but unfortunately, it doesn’t work. Answer How to explicitly call the specified overload function? Convert the argument at

Advertisement