Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] Stuck turning a complex gramamr action to a primitive trasnform
From: Eric Niebler (eric_at_[hidden])
Date: 2009-10-28 16:00:20


joel wrote:
> Eric Niebler wrote:
>> I don't know what you mean. Are you referring to the fact that
>> _make_terminal is not a primitive transform? It is a callable function
>> object. Unfortunately, the _make_terminal name follows Proto's naming
>> conventions for primitive transforms, even though it isn't. Is that
>> what has thrown you off?
>
> Ah, seems so yes. So I have to take it's boost::result_of instead of
> seekign a non-existant result_of::make_terminal ?

proto::_make_terminal is just a typedef for
proto::functional::make_terminal, which is itself a typedef for
proto::functional::make_expr<proto::tag::terminal>. If you're looking
for the corresponding result_of:: metafunction, you should use
proto::result_of::make_expr<proto::tag::terminal, ...args...>

> If yes is my idea of composing ok ?

Sure.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net