Reducing template bloat with inheritance
- by benoitj
Does anyone have experience reducing template code bloat using inheritance?
i hesitate rewriting our containers this way:
class vectorBase
{
public:
int size();
void clear();
int m_size;
void *m_rawData;
//....
};
template< typename T >
class vector : public vectorBase
{
void push_back( const T& );
//...
};
I should keep maximum performance while reducing compile time
I'm also wondering why stl implementations do not uses this approach
Thanks for your feedbacks