As the subject says, I’m trying to create a vector of histograms. This needs to be a member variable of a class so I need to get the types right in the declaration. I keep getting type conversion errors when I pass the axis to the constructor, so I’m trying a non-vector example. Here’s the base code:
using UU = boost::histogram::unlimited_storage<std::allocator<double> >;
using AA = std::tuple<boost::histogram::axis::variable<double> >;
boost::histogram::histogram<AA, UU> histo;
histo = boost::histogram::histogram(ax); //this has a conversion problem
The error on VS 2017 is:
error C2440: '<function-style-cast>': cannot convert from 'boost::histogram::axis::variable<double,boost::use_default,boost::use_default,std::allocator<_Ty>>' to 'boost::histogram::histogram<boost::histogram::axis::variable<double,boost::use_default,boost::use_default,std::allocator<_Ty>>,boost::histogram::default_storage>'
note: No constructor could take the source type, or constructor overload resolution was ambiguous
I can see that the types are different, but no matter what I do with the template arguments of the axis type I still get that error.