Why does the C++ linker allow undefined functions?
This C++ code, perhaps surprisingly, prints out 1 . #include <iostream> std::string x(); int main() { std::cout << "x: " << x << std::endl; return 0; } x is a function prototype, which seems to be viewed as a function pointer, and C++ Standard section 4.12 Boolean conversions says: 4.12 Boolean conversions [conv.bool] 1 A prvalue of arithmetic, unscoped enumeration, pointer, or pointer to member type can be converted to a prvalue of type bool. A zero value, null pointer value, or null member pointer value is converted to false; any other value is converted to true. For direct-initialization (8