As per this answer, class template could be represented like this:
___________: T :
| :.....:
| |
| ClassName |
| |
|______________|
Then how to represent the composition relationship with class template?
For example, given
template <typename T>
class FooRes
{
public:
T res;
bool valid;
};
,how to represent the relationship with the classes below?
class Demo
{
public:
int height;
int width;
int area;
};
class MultiRes
{
private:
FooRes<Demo> res1;
FooRes<int> res2;
FooRes<double> res3;
};
I think a class diagram for the said example could make it clear enough.
Could somebody shed some light on this matter?