Boost logo

Boost :

Subject: Re: [boost] [predef] A few questions
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2013-08-01 12:36:09

On Thu, Aug 1, 2013 at 3:38 AM, Andrey Semashev

> Hi,
> I have a few questions/nitpicks regarding Boost.Predef:
> - I see that all headers have extension .h. Why is it not .hpp, like
> with the rest of Boost? It this intentional?

Yes it's intentional.. To mean that they aren't just C++ headers, but
regular C and also Objective C headers.

- There is a tab in predef/version_number.h. There are also tabs in tests.

Sorry about that.. I normally use tabs in my work and I sometimes forget to
use spaces for Boost code. Will fix soon.

> - There are __SunOS_5_10, __SunOS_5_11 and similar macros defined on
> Solaris, which allow to detect OS version. These are not always
> available but I think SunPro defines them. Could these macros be used
> to select the proper OS version?

Sure. Could you add an issue to the github project?

> - If I'm not mistaken, BOOST_COMP_GNUC and BOOST_COMP_MSVC will get
> defined not only for the real GCC and MSVC but also for pretenders. Is
> this intentional?

There was some discussion about this during and after the review. My stance
is that it is better to give more information as direct reflection of what
the toolset is reporting as it's not really possible at this level to
determine the intent of the user code (i.e. if users are going to write
code that works for the emulations or only works for the core compiler).

If so, could we have special macros to detect these
> particular compilers? Boost.Config defines BOOST_MSVC and BOOST_GCC
> for this purpose.

My plan is to introduce another set of defs for indicating the "core"

> - There is considerable overlap with Boost.Config. Is there any plan
> to reduce the duplication? Maybe move some things from Boost.Config to
> Boost.Predef?

Yes, the intent has always been to reduce some of the duplication. But
given how much code depends on Config it will take some time and careful
thought to refactor.

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. -
-- rrivera/ - grafik/
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

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