From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-04-09 06:06:04
Tobias Schwinger wrote:
> Where is the problem?
> #include PLATFORM_HEADER(foo.h)
> Should work. I've no idea how portable it is, though.
This exactly is the problem. This works with MS compilers, but not with
gcc. It complains with: #include' expects "FILENAME" or <FILENAME>"
However the following does work with gcc:
#define PLATFORM_PFX <boost/whatever/windows/
#define PLATFORM_HDR foo.hpp
#define PLATFORM_SFX >
#include PLATFORM_PFX PLATFORM_HDR PLATFORM_SFX
Unfortunately this wont work on MS compilers.
My question was if it would be possible to get something that is
compileable on a couple of platforms. I am aware that macro expansion
after precompiler prefix seems to be implementation dependent. I am not
even sure if the standard has to say anything about this.
At least gcc seems not to conform to what is said in this (rather dated)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk