Limits of UML templates
The problem that you encounter is related to the way UML deals with the substitution of template parameters with the bound elements. And this is primarily caused by the notation and not the inheritance.
In fact, if you would have a myClass
with only composition:
template<typename T>
class myClass {
T a;
vector<T> v;
...
};
using myClassDataA = myClass<dataA>;
you could represent it in a self-contained way in UML with, the template parameter being used only within the template class:

But there is as far as I know, no way to templatize an equivalent expression of the same class, if you would like to show the T properties as association end:

And for the inheritance, it's the same issue: the inherited class is outside the template class. But here, there is no notational shortcut that could magically include it in the template box.
Visual workaround?
If it is mainly for graphical communication of a C++ design, you could suggest visually, that a group of classes all depend on the same template parameters. In my composition example above, it would look like:

For your inheritance situation it would be:

But keep in mind that there is no semantic defined in UML for that. For instance, nothing would allow an UML tool to identify all the members of myClass<dataA>
that would be inherited from dataA
. In other words, no UML code generator or tool would be able to produce something meaningful with the models, but fellow C++ programmers will perfectly understand what you mean.
Better design?
While your template construction is very powerful, it is also very error prone as the operations that you can perform on the instantiation of the same template, would depend on the bindings. This means that you would need different test cases for every single instantiation of the template.
So it's worth to remind the general principle:
Prefer composition over inheritance
So just create a dataHandler
member in your template class, and forward a set of well-identified operations that should be common to all handlers to this member. You then could model it in UML without difficulty using the existing UML semantics.
I know, it's not so flexible; but I think the little extra hassle for the operation forwarding, will save you a lot of troubles later. If really you need more flexibility, you could also think to invert the inheritance using CRTP but this time with a much clearer and unambiguous UML modeling.