
Stefan,
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 http://boost.org/libs/wave/doc/class_reference_context.html.
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 (http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Preprocessor-Opti ons.html#Preprocessor-Options).
(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? Regards Hartmut
Thanks a lot !
Stefan
--
...ich hab' noch einen Koffer in Berlin... _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost