You'll have to post your code ... I can't tell what problem you might
be running into.
Well, I decided to be a coward for today. I'll shelf this functional
solution for later. I just added
my own ternary_expr & quaternary_expr class for the moment as it seems
it's all the client wants.
I'll come back when I've digested those infos as I htink I'm just doing
a small error.
For reference here is the code I wrote:
namespace bp = boost::proto;
struct push_front_
{
template<class Sig> struct result;
template
struct result
{
typedef typename
boost::fusion::result_of::push_front::type type;
};
template
typename result::type
operator()(Elem const& e, Seq& s ) const
{
return boost::fusion::push_front(s,e);
}
};
struct _load : bp::transform< _load >
{
template
struct impl : bp::transform_impl
{
typedef typename meta::strip<Expr>::type::value_type result_type;
result_type operator()( typename impl::expr_param expr
, typename impl::state_param
, typename impl::data_param data
) const
{
return expr(data);
}
};
};
struct eval_xpr
: bp::or_< bp::when< bp::terminal< blockbp::_,bp::_ >
, _load(bp::_)
>
, bp::when< bp::nary_expr< bp::_, bp::vararg >
, bp::functional::unpack_exprbp::tag::function(
push_front_(bp::_,
bp::terminalbp::_ > >() )
)
)
>
> {};
--
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35