Boost logo

Boost :

Subject: Re: [boost] C++17 detection
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-09-11 01:28:58


On 11/09/2017 13:11, James E. King, III wrote:
> I did the same thing with smart_ptr, allowing for a transition between
> boost and std in the Apache Thrift project going from C++03 to C++11.
> Unfortunately it was a bunch of trial and error as no macro seemed to cover
> it completely.
>
> https://github.com/apache/thrift/blob/master/lib/cpp/src/thrift/stdcxx.h

The comment header in that Smart Pointers block seems incorrect, BTW.

I assume you meant that BOOST_NO_CXX11_SMART_PTR was *not* defined in
VS2010 and VS2012 (since they do implement std::shared_ptr).

For the other part, perhaps you could have made use of
BOOST_NO_CXX11_TEMPLATE_ALIASES?


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