variant with shrink

boost::variant should be
variant

2013/2/27 Niitsuma Hirotaka
boost::variant should be
variant
=> int
variant
=> double
variant
=> boost::rational<int> variant
=> variant 1. Is double guaranteed to be a superset of int?
2. Do you lose the information, which type is contained (int/double)? Regards, Kris
I wrote such extension
https://github.com/niitsuma/variant_shrink _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

You can edit your prefer type generalize oder
typedef boost::mpl::vector
1. Is double guaranteed to be a superset of int? 2. Do you lose the information, which type is contained (int/double)?
Regards, Kris
I wrote such extension

On Wed, Feb 27, 2013 at 5:10 AM, Niitsuma Hirotaka < hirotaka.niitsuma@gmail.com> wrote:
You can edit your prefer type generalize oder
typedef boost::mpl::vector
::type ordered_number_types; =>
typedef boost::mpl::vector
::type ordered_number_types;
float tends not to hold all ints. double usually does, although I'm not sure it is guaranteed. Tony

float tends not to hold all ints. double usually does, although I'm not sure it is guaranteed.
Such complicated type order can use by defining
is_generalizable_to
participants (3)
-
Gottlob Frege
-
Krzysztof Czainski
-
Niitsuma Hirotaka