Hello,
I have this error w msvc2008:
error C2664:
'nicohich::systems::make_parameters_for_simulate::type::type(c
onst boost::fusion::vector1<T0> &)' : cannot convert parameter 1 from 'const
parameters_1_n_seq_t' to 'const boost::fusion::vector1<T0> &'
1> with
1> [
1> parameters_t=my_ns::systems::ns1::parameters,
1> T0=boost::variant
1> ]
1> and
1> [
1> T0=boost::variant
1> ]
1> Reason: cannot convert from 'const parameters_1_n_seq_t' to 'const
boost::fusion::vector1<T0>'
1> with
1> [
1> T0=boost::variant
1> ]
1> No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
where parameters_1_n_seq_t which is a result of a metafunction invocation
is: (as determined at runtime by typeid(parameters_1_n_seq_t).name(), I
manually edited out the namespaces and trailing boost templates args ):
fusion::transform_view<
fusion::vector1<
optional<
variant<
std::vector<double>,
my_ns::range_incr<double>,
my_ns::range<double>,
double
>
>
,
deoptionalize_item,
void_
where
struct deoptionalize_item
{
typedef deoptionalize_item Self;
template<typename Sign>
struct result; // primary template
template<typename T> // template spec
struct result
{
typedef const T& type;
};
template <typename T>
const T& operator()( const boost::optional<T>& rhs ) const
{
return *rhs;
}
};
my_ns::systems::ns1::parameters is defined as:
namespace systems
{
struct base_parameters {
double x;
};
namespace ns1
{
struct parameters : public base_parameters {
// double y
};
}
}
// at global namespace
BOOST_FUSION_ADAPT_STRUCT(
my_ns::systems::ns1::parameters,
(double, x)
// (double, y)
)
Previously, parameters held the field y, and this error didn't happen.
Regards,