Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1285

Comment by HolyBlackCat on Why do some parts of the C++ standard library use inheritance instead of templates?

$
0
0
When you implement << and >> for your class, they accept a reference to the stream base class. How else could that work? (Yes, there are some possible alternative designs, but inheritance seems natural here.)

Viewing all articles
Browse latest Browse all 1285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>