|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-24 20:01:56
----- Original Message -----
From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
> Hugo Duncan wrote:
> > Maybe my use of ITERATE is slightly different, in that I am using
> > it to include a LIST of files. The LIST provides a single
> > integration point. Hoisting all the includes reduces the utility
> > of using ITERATE.
>
> OK, I see the problem now.
>
> >
> > I can hoist the include of <boost/mpl/list.hpp> (and have done so
> > for the moment), but I don't think that I should have to.
> >
> > The way I look at it, the fact that MPL uses ITERATE in its header
> > files is an implementation convenience for MPL, and should not be
> > visible to the user.
>
> You have a point, here. I'll look into the issue tonight.
Don't bother. What Hugo is doing is a "sketchy" use of the mechanism
precisely because of this type of problem. Even if you define a special
flag macro to distinguish a certain MPL iteration from some other iteration,
you are still going to have serious problems. Specifically, you'd have to
rewrite all of it to reenter the file-iteration mechanism in an abstract and
relative way, which means no direct references to specific iteration frames
at all. This kind of thing is the purpose of the "relative" macros, but I
cannot _evaluate_ the filename to iterate over. Therefore, I cannot
abstract the depth.
---> It should be considered an absolute rule that you don't include normal
headers inside an iteration. <---
(If I missed saying that in the docs, sorry, I'll fix it. I actually
thought that I mentioned it, but I haven't checked.)
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk