|
Boost : |
From: Jaap Suter (J.Suter_at_[hidden])
Date: 2002-09-19 05:13:03
> > For example, why limit this to
> > only one -type depth? Why not call ::type on the incoming parameters
until
> > we reach a type that has a ::value parameter?
>
> It's not necessary if all metafunctions does it.
Yeah, after some thinking I came to the same conclusion. Your analogy with
runtime functions and how their parameters aren't evaluated until you call
the function is spot on! In fact, the more I think about it, the more I
agree that this is actually the right way to do it. Once every meta function
works this way, we could even remove the current mpl::if_ and rename
mpl::apply_if to mpl::if_ because it works the way we want it.
I really think this would be a welcome change to the MPL. Are there any
drawbacks? Once again, the analogy with runtime parameter evaluation shows
this design is the correct one, imho.
Thanks for your in-depth reply Terje,
Regards,
Jaap Suter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk