From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2007-03-11 10:22:57
> >> Does anything like this exist ? Are there plans to support
> such use
> >> cases ?
> > Wave does already support that! The iterator returned from
> the context
> > has a member function force_include():
> > context_type::iterator_type it = ctx.begin();
> > for (each of the files to be pre-included)
> > it.force_include(filename, last_name);
> Excellent ! Unfortunately it seems the context::iterator_type
> isn't documented anywhere, at least I couldn't find this
> feature in
You're right. It's not documented anywhere, I'll have to add this info.
> Also, I believe the implementation contains a bug (though to
> be really sure I'd need to see the specification):
> It appears the force-included header is searched as if
> included by means of #include "file", i.e. starting in the
> directory containing the main input.
> In contrast, the gcc documentation explains that the search
> should disregard that main input's directory, and start
> searching in the current working directory instead
> (Please bear with me for using gcc as the authoritative input ;-) )
You're right again. The filename is interpreted as if it has been specified
by a #include "file" directive. Frankly, I didn't even look at the gcc
behavior wrt this. I'm not sure about the rationale of gcc's behavior
either, I chose Wave's behavior as to allow for (force-)include files in the
directory containing the main file.
Do you think we should change that behavior?
> Thanks a lot !
> ...ich hab' noch einen Koffer in Berlin...
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk