Sorry, guys, but I gotta bring up another question...
Is there anything I need to remember when inheriting from templated classes? My head hurts too much thinking about it... :-(
-Normie
Templated Classes...Oy.
I don''t think so...
You can inherit from a template in two ways - you can inherit its ''templatiness'', in which case the inherited class is also a template and subject to the same restrictions, or you can inherit from a specific instantiation of the template, in which case it behaves as a normal class from then on.
You can inherit from a template in two ways - you can inherit its ''templatiness'', in which case the inherited class is also a template and subject to the same restrictions, or you can inherit from a specific instantiation of the template, in which case it behaves as a normal class from then on.
template < class T >class blah{ // blah stuff here}// inherit as a general templatetemplate < class T >class yadda : public blah<T>{ // yadda stuff here}// Inherit from a specific typeclass whaffle : public blah<int>{ // whaffle stuff here}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement