
14 Nov
2008
14 Nov
'08
7:11 p.m.
Joel Falcou wrote:
I have a DSL defined in proto. What's the best wayt o build functions that returns an expression made of this DSl elements. Like let's say the vec_expr class support+-*/ operators
I want to write
??? f( vec_expr<W> const& a, vec_expr<Y> const& b) { return (a+b)/(a-b); }
How can I easily (aka no nested make_expr call) build the return type ?
Why don't you want to use make_expr? That's what it's for. You build the return type with proto::result_of::make_expr, and call proto::make_expr() from with f(). http://tinyurl.com/5nhmgw -- Eric Niebler BoostPro Computing http://www.boostpro.com