Hi,
What is the reason fusion::transform taskes a const Sequence?
template<
typename Sequence,
typename F
>
typename result_of::transform::type transform(
Sequence const& seq, F f);
Does this means that the transform do not change the sequence itself o also its elements?
Why the following do not compiles
struct get {
template<typename Sig> struct result;
template<typename T> struct result {
typedef typename boost::remove_reference<T>::type ACT;
typedef typename ACT::result_type type;
};
template<typename ACT>
typename ACT::result_type operator()(ACT& act) const
{ return act.get(); }
};
boost::tuple t;
boost::fusion::result_of::transform<
boost::tuple , get>::type res=
boost::fusion::transform(t, get());
transform call to get()(const shared_future<int>&act). How can I make a transformation changing also the sequence itself?
The result of transform is a transform_view, so the function get is not really called. How can I assign this to a
boost::tuple = ??(boost::fusion::transform(t, get()));
boost::as_vector? Is there a as_tuple function? Should this force the evaluation of the get function?
Thanks,
Vicente