Horstmann’s C++ pitfalls tackles an interesting point when talking about streams. To quote him:
Use conversion to
void*, not conversion tointorbool, to implement objects yielding truth values. Unlikeintorbool,void*have no legal operations other than==comparison.
As a programmer, I would be puzzled if some function returned void* when I expect a boolean. Horstmann provides an example where using a void* instead of a bool seems appropriate. Is it always advisable?
 
     
    