3
Contributors
2
Replies
3
Views
4 Years
Discussion Span
Last Post by mike_2000_17
0

You could use inheritance (OOP) but it would be very wasteful for such small attributes.

Basically, what you need is a class template like Boost.Variant as your "NAttrib" implementation, while your FloatAttribute and ComplexAttribute can remain very simple (no template, no inheritance). This is fairly advanced and uses templates and overloading in non-trivial ways, of course.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.