Here's my problem: I want to subclass QVector in order to add some function specific to my context.
Naive approach was:
class ClassVector : public QVector<Class> { ... }
But problem here is when I need to call one of few functions on QVector which return new QVector (or & to itself):
ClassVector cv1, cv2;
auto sum = cv1 + cv2;
This is valid but sum is QVector, since operator+ return QVector.
Is there simple way to make it return ClassVector somehow?
Calling reinterpret_cast on the result is not what I want to do :/
If it's important, I only add functions to ClassVector, no data members.
Thanks for help.