Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-07-14 09:50:57

williamkempf_at_[hidden] wrote:

> This is the behavior of your C compiler, not the behavior defined by
> either the C standard or C++ standard.

        According to C89 and C99, the following is ALSO permitted:

        #include pp_tokens newline

in particular

        #include FILENAME

is permitted. See 6.10.2/4 of ISO/IEC 9899:1999 for example.

So this is a possible solution. Use the PREPROCESSOR library
to construct the filename using conditionals dependent
on platform configuration information.

In particular we can make macros that expand to absolute
path names:

        #include "C:\MyBoost\boost\details"

A few libraries, such as the preprocessor and configuration
libraries, will have to be found by

        #include <boost/config.h>
        #include <boost/preprocessor.hpp>
        #include <boost/includes.hpp>

(or whatever).

The library vendor then writes:

        #include BOOST_REGEXP
        #include BOOST_FUNCTION

The main difficulty with this technique is that you can't
extend boost by just adding files into a directory,
you have to update the 'includes.hpp' file.

But that can be fixed too:

        #include BOOST_INCLUDE(regexp)
        #include BOOST_INCLUDE(function)

with some cleverness in the definition of BOOST_INCLUDE.

I once tried this, but failed because I didn't really grok
the preprocessor. So I can't guarrantee the technique
will work, but I think it might be worth investigation
by someone that does understand the preprocessor.

John (Max) Skaller, mailto:skaller_at_[hidden] 
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix
Literate Programming tool Interscript

Boost list run by bdawes at, gregod at, cpdaniel at, john at