From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-28 17:10:58
Eric Niebler wrote:
>>>> - Does ``and_< T0,T1, ... Tn >`` *really* only apply ``T``\ *n*?
>>> Yes. It can't apply all the transforms. The result of applying the first
>>> transform might have a type that the second transform can't make sense
>>> of. Transforms don't chain that way.
>> They could be chained by and_, could they not?
> No, not in any meaningful way. Consider:
> when<G1, T1>
> ,when<G2, T2>
> T1 requires that any expression passed to it matches G1. Likewise for T2
> and G2. Now, imagine that the result of applying T1 is some type that
> *doesn't* match G2 ... it might not even be an expression! If you tried
> to pass it to T2, you would be violating T2's preconditions. T2's
> transform will likely fail.
How about passing it the _state parameter?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk