Inheriting from a template parameter

28 views
Skip to first unread message

Force field

unread,
Jul 17, 2026, 6:58:35 AMJul 17
to StarUML
In C++ a class can inherit from a template parameter identifier.  I don't think UML is able to model that.  I currently use a note.  Has anyone got any opinions on this?  This is a general UML question and not specific to StarUML.

Oliver Reinhard

unread,
Jul 17, 2026, 10:31:58 AMJul 17
to Force field, StarUML
Can you give us an actual, representative C++ code example so we know exactly what you mean?

On Fri, 17 Jul 2026 at 12:58, Force field <forcef...@gmail.com> wrote:
In C++ a class can inherit from a template parameter identifier.  I don't think UML is able to model that.  I currently use a note.  Has anyone got any opinions on this?  This is a general UML question and not specific to StarUML.

--
You received this message because you are subscribed to the Google Groups "StarUML" group.
To unsubscribe from this group and stop receiving emails from it, send an email to staruml+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/staruml/5df788e1-3c26-43f8-9401-f365aaabbd30n%40googlegroups.com.

Force field

unread,
Jul 17, 2026, 10:49:04 AMJul 17
to StarUML

template <typename A>
class B : public A {
};
A is a template parameter of B and also inherited from by B.
Reply all
Reply to author
Forward
0 new messages