|
Boost Users : |
From: damien_at_[hidden]
Date: 2019-07-19 23:41:06
Hi all,
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> >;
AA ax;
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_defau
lt,std::allocator<_Ty>>' to
'boost::histogram::histogram<boost::histogram::axis::variable<double,boost::
use_default,boost::use_default,std::allocator<_Ty>>,boost::histogram::defaul
t_storage>'
with
[
_Ty=double
]
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.
Can anyone help?
Damien
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