Excerpt from Exceptional C ++:
"In the old days, you could just replace" #include "with" class ostream; "in this situation, because ostream used to be a class, and it was not in the std namespace. Alas, no more. class ostream;" is illegal for two reasons:
ostream is now in the std namespace, and programmers are not allowed to declare anything that lives in the std namespace.
ostream is now a typedef template; in particular, it is typedef'd as basic_ostream. Not only would the basic_ostream template be messy for sending-declaring anyway, but you couldnโt reliably redirect-declare it at all, because library implementations are allowed to do things like add your own additional template parameters (beyond those required by the standard ), which, of course, your code would not know about - one of the main reasons for the rule that programmers are not allowed to write their own declarations for things in the std namespace. "
My question is:
I do not understand the part in bold.
Thanks,
source share