Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-27 19:52:02


On Sunday 27 January 2002 07:40 pm, you wrote:
> On 1/27/02 4:26 PM, "Douglas Gregor" <gregod_at_[hidden]> wrote:
> > I suggest the following patch to
> > boost/config/suffix.hpp, which has been successfully tested on the
> > aforementioned platform.
>
> I'd like to see this change in bsd.hpp rather than in suffix.hpp. Even
> though this does theoretically apply for one other platform (macos.hpp with
> __MACH__ defined, which is a FreeBSD-derived platform), it's going against
> the flow of the design of the config library to put a
> compiler-and-platform-specific check into suffix.hpp.
>
> If we want to be pedantic about keeping compiler details in the compiler
> headers, we could do this by to inventing a private symbol for config, such
> as BOOST_HAS_CTYPE_MACRO_WORKAROUND, define it appropriately in gcc.hpp,
> and then check it in both bsd.hpp and macos.hpp.

I chose to place it in suffix.hpp because I didn't think we wanted any order
dependencies between the compiler, standard library, and platform
configuration macros, which BOOST_HAS_CTYPE_MACRO_WORKAROUND would require.

I personally think it would be better to have checks that are specific to
compiler/platform/stdlib combinations in suffix.hpp than to put
compiler-specific checks in, i.e., the platform includes. However, my second
choice would be to put direct checks for GCC in bsd.hpp (and macos.hpp,
though I can't verify anything on that platform).

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk