Subject: Re: [boost] [PREDEF] Review for the Boost.Predef library by Rene Riviera
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2012-02-28 00:43:49
On 2/27/2012 1:20 PM, Dave Abrahams wrote:
> on Sat Feb 18 2012, Rene Rivera<grafikrobot-AT-gmail.com> wrote:
>> On 2/18/2012 8:08 AM, Joel Falcou wrote:
>>> How to get it ?
>>> Sources and documentation can be retrieved from http://tinyurl.com/73n6a3k
>> You can also find the sources and docs in the sandbox
>> <http://svn.boost.org/svn/boost/sandbox/predef/>. Browsable docs at
> One thing I don't see is any distinction between the target being
> compiled for and the host on which the compilation is happening. You
> could make an argument that no such distinction is needed, but in the
> absence of such an argument I suggest changes like
> BOOST_ARCHITECTURE_XXX => BOOST_TARGET_ARCHITECTURE_XXX
I don't think I made such an argument :-) The argument is way simpler
than that. None of the compilers I'm aware of tell you *directly* what
host architecture they are running if it happens to be different from
the target architecture. The best you can do is some user defined
predef, or something derived from running something like uname.
As for the name.. I'm open to suggestions. But as was mentioned ealier
the name is rather long already. Which many people already object to.
In general I'm all for detecting as much as we can from the compilers.
Assuming that it's something that is generally possible. As detecting
something for one or two compilers seems like a waste of development time.
But then, the Predef library is also about giving users a way to define
such detected version numbers on their own. Which is something that
seems to have been lost. So I'm pointing it out for clarity.
> Also, when BOOST_TARGET_ARCHITECTURE_XXX is 1, shouldn't we also have
> #define BOOST_TARGET_ARCHITECTURE XXX
What would the "XXX" be in the define? ..The only option I can see is
defining a string literal. Which is only useful for informational
debugging uses. And not the more general decision testing.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk