This patch fixes ostreams operator<< so that it properly returns an lvalue reference.
It also forces the input and return type to be basic_ostream. This is inline with the standard.
It appears as though http://cplusplus.github.io/LWG/lwg-closed.html#1203 was implemented even though it was never accepted (and is now closed).