operator<< for streambuf* (or int , which sounds simpler), and char could be implemented as member operators or as non-member (free) operators.
I assume that this is due to retro-compatibility issues that occurred when defining C ++: perhaps the older code was passed by the operator<<(int) member, and so they decided not to port it as a free operator.
The standard C ++ library (as well as STL) has several heterogeneities like this one.
peoro source share