Closest Common Type

Lutger lutger.blijdestin at gmail.com
Fri May 16 10:23:07 PDT 2008


BCS wrote:

> I have a tuple of types, I want a template that evaluates to the most
> specialized base type of all of them. I'll be using it for classes but for
> other cases it just needs to do something sane (erroring out would do).
> 
> No point in reinventing the wheel so, anyone have such a template laying
> around?

tango.core.Tuple and std.typetuple have templates called MostDerived and
DerivedToFront, these might be helpful?


More information about the Digitalmars-d-learn mailing list