Boost logo

Boost :

Subject: Re: [boost] C++0x and MSVC 10
From: Zachary Turner (divisortheory_at_[hidden])
Date: 2010-02-15 00:17:31

On Sun, Feb 14, 2010 at 10:54 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> Zachary Turner wrote:
>> On Sun, Feb 14, 2010 at 9:45 PM, Scott McMurray <[hidden]
>> >wrote:
>>> On 14 February 2010 22:30, Zachary Turner <divisortheory_at_[hidden]>
>>> wrote:
>>>> It almost appears as if the #else was simply forgotten on the first #if.
>>>> Can't we safely change the first conditional to the following?
>>> I thought the convention was, for standard features, to just have the
>>> _NO_ version, and check for #ifndef if you want it, rather than having
>>> to keep both _NO_ and _HAS_ versions of the same thing.
>> Possibly, to be honest I'm not familiar with the conventions surrounding
>> these sorts of things and I couldn't find much documentation. The
>> solution
>> I came up with was based off of looking at the gcc header file, and noting
>> that it does keep _NO_ and _HAS_ versions of the constants, and
>> additionally
>> in various header files I still see plenty of references to BOOST_HAS_xxx
>> scattered around.
>> Either way, I guess some consensus needs to be reached, and maybe we
>> should
>> change the rest of the codebase to follow it so that all libraries agree
>> on
>> the convention.
> If I recall correctly...
> C++0x features were originally, HAS_*, but we decided that
> it should really be NO_* a while back. The HAS_* versions
> are still there for backwards compatibility.
Fair enough. What's the best way to handle code that is only using the HAS_
version and I guess hasn't been updated to use the NO_ version? See, for
example, intrusive_ptr's move constructor. I guess the options are either:

a) Make sure all preprocessor checks over the entire code base are changed
to (HAS_ || !NO_) or (NO_ || !HAS_) depending on the statement,


b) Move one header up from the compiler specific headers, and then after the
correct compiler-specific header has been included, check for the occurrence
of every NO_, and set every corresponding HAS_


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