Hi,
I have a grammar, domain and an extended expression i.e.
struct ga_domain : proto::domain, ga_grammar>
{};
template<typename Expr>
struct ga_expr : boost::proto::extends
{
// ....
};
When the expression is transformed some instances of the ga_expr<> wrapper
get removed. For example
// some function that expects a ga_expr<Expr> as 2nd arg
void evaluate_expr(Res& res, const ga_expr<Expr>& expr)
{
// ....
}
// some function which transforms the expression and calls evaluate_expr()
template
void evaluate(Res& res, const ga_expr<Expr>& expr)
{
BOOST_MPL_ASSERT((proto::matches< ga_expr<Expr>, ga_grammar>));
evaluate_expr(res, ET::transform_expression()(expr) );
}
With the (do nothing) transform
struct transform_expression : proto::nary_expr > {};
I get the following messages (using gcc 4.4.1, boost 1.42)
In function ‘void clifford::evaluate(Res&, const clifford::ga_expr<Expr>&)
[with Res =
clifford::element >, clifford::cga3::cga3,
clifford::default_tags>, Expr =
boost::proto::exprns_::expr, mpl_::integral_c >, clifford::cga3::cga3, clifford::default_tags>&>, 0l> > >,
1l>]’:
error: no matching function for call to
‘evaluate_expr(clifford::element >, clifford::cga3::cga3,
clifford::default_tags>&,
boost::proto::exprns_::expr, mpl_::integral_c >, clifford::cga3::cga3, clifford::default_tags>&>, 0l> >&>,
1l>&)’
So the clifford::ga_expr<> wrapper got removed from the unary reverse
operator and i'm not sure what i'm supposed to add to make it stay.
thanks