Boost logo

Boost :

Subject: Re: [boost] [config] std::unique_ptr, std::ref detection?
From: Daniel James (dnljms_at_[hidden])
Date: 2012-03-03 14:08:15


On 3 March 2012 18:08, Jeffrey Lee Hellrung, Jr.
<jeffrey.hellrung_at_[hidden]> wrote:
>
> I'll ultimately defer to your and others' judgements here. Let me just say
> that it does sound like an argument can be made to continue to use
> BOOST_NO_INITIALIZER_LISTS (indicating whether the compiler correctly
> implements and supports (including header support) initializer lists)
> rather than BOOST_NO_0X_HDR_INITIALIZER_LISTS (header is present and...well
> who knows what else? should it only be undefined in the former case for
> BOOST_NO_INITIALIZER_LISTS?). The former macro is also more succinct.

Not really my decision, but for the most part we are only concerned
with the header. The macro will usually be used to determine the
interface, not the implementation. We generally wouldn't write the
following, as it's easier and less error prone to write just the C++03
implementation.

void foo() {
#if defined(BOOST_NO_INITIALIZER_LISTS)
    // C++03 implementation
#else
    // C++11 implementation using initializer lists
#endif
}


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