
Hi, I need a variant type object that can hold any type characterized by a template. For example Boost.Units have a family of types parameterized by "System". quantity< unit<dimension, System>, double> suppose dimension is fixed, e.g. typedef boost::units::length dimension is it possible to define a variant over that family of types? I could create a make_variant_over< list of all types > but that can be that list will be fixed and each time I defined a new System the list will have to grow. to simplify the question: template<class T> class dummy{ ... }; variant< "dummy<T>" > v; //for all T If it simplifies things, suppose that all dummy<T> have the same sizeof and that all are convertible to each other. Or should I be using an extension of boost::any with some adhoc restriction over the possible types on construction? Thank you, Alfredo