Boost logo

Boost Users :

Subject: Re: [Boost-users] variant with shrink
From: Niitsuma Hirotaka (hirotaka.niitsuma_at_[hidden])
Date: 2013-02-27 05:10:53


You can edit your prefer type generalize oder

typedef boost::mpl::vector<int,boost::rational<int>,float,double,long
double,std::complex<double>,std::complex<long double> >::type
ordered_number_types;

=>

typedef boost::mpl::vector<bool,char,int,boost::rational<int> >::type
ordered_number_types;

> 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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net