On Mar 18, 2011, at 9:17 AM, Karsten Ahnert wrote:

> Hmm, this might work. It is similar to
> 
> my_method( fusion::make_vector( i+i , i*i*i , i*i ) , x );
> 
> But the expression might become really large, say 100 elements. A
> separation between construction and usage would be nicer.


How about?

    struct expr_list_tag {};

    ...

    terminal<int>::type i = {0};

    // you could wrap this in a function named construct or whatever
    auto e = make_expr<expr_list_tag>(i+i, i*i, i*i*i);

    ...

    do_step(e, x);

I think you need to capture terminals by value to do this kind of thing.
_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to