On OS X, simple C++ program gives incorrect results (which are a result of command-line options ‘c++03’ vs ‘c++11’)
Firstly, the expected difference in behaviour is because the operator<<(std::ostream&, const char*) overload (it’s actually a function template specialization, but nevermind for now) has a parameter of type std::ostream& and an lvalue reference can only bind to an lvalue, and in your example the stream is an rvalue so that overload can’t be used. In … Read more