g++应该是从指针到bool MS 应该是从指针到void* [解决办法] VS是错误的,G++是正确的。
There are no overload for pointers to volatile or function pointers (other than the ones with signatures accepted by the 9) overload). Attempting to output such objects invokes implicit conversion to bool, and, for any non-null pointer value, the value 1 is printed (unless boolalpha was set).