
Larry Evans wrote:
There was also an issue with separation of transforms from grammars. This mixing made it hard for me to understand transforms. I believe separating the two would make understanding for other novice users easier also. Of course I'm not even real sure that separation is possible, as I intimated with the '*highly* speculative' qualifier in my review. However, since then I've been trying to separate the two. This lead me to understand *maybe* why bundling the two is necessary. The pass_through transform docs contain:
, boost::result_of < Grammar::proto_childN(Expr::proto_childN, State, Data) >::type
Now if Grammar::proto_childN is *not* derived from pass_through, then that would make the above an object CTOR call.
No, you are confusing how boost::result_of and proto::when interpret function types. result_of has a protocol, documented in TR1, for calculating the return type of a function or function object given a function type as above. proto::when has a different convention, which doesn't come into play here.
Unless the N-th child has a 3 element CTOR, then this will fail to compile. OTOH, if then N-th child is derived from pass_through (IOW, if the grammar and transform are bundled), then this will compile.
Eric, is that about right?
-- Eric Niebler Boost Consulting www.boost-consulting.com