Subject: Re: [boost] Curiousity question
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-10-12 21:35:37
On 10/12/2016 9:29 PM, Stefan Seefeld wrote:
> On 12.10.2016 21:19, Edward Diener wrote:
>> On 10/12/2016 8:40 PM, Stefan Seefeld wrote:
>>> On 12.10.2016 20:20, Edward Diener wrote:
>>>> On 10/12/2016 7:17 PM, Stefan Seefeld wrote:
>>>>> At this point in time (with GCC 6.2 as my default compiler in my
>>>>> development environment), I'd use std::shared_ptr, and fall back to
>>>>> boost::shared_ptr for environments without C++11 support.
>>>> How would you fall back to support boost::shared_ptr ?
>>> With something as simple as:
>>> #if __cplusplus >= 201103L
>>> // use std::shared_ptr
>>> // use boost::shared_ptr
>> Wouldn't you need to duplicate the above every time you are using
>> shared pointers ?
> That depends on the granularity of the conditional block (something
> between conditionalizing a single token and including an entire header).
> What works best depends on the specific context.
> In Boost.Python there aren't that many places in need of
> conditionalizing. Most code is so generic it doesn't even know or care
> whether it's passing shared pointers around.
OK, Thanks for the explanation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk