|
Boost Users : |
Subject: Re: [Boost-users] Convert boost::shared_ptr to std::shared_ptr for boost::dll::import
From: Martijn Otto (boost_at_[hidden])
Date: 2018-04-13 07:12:49
On do, 2018-04-12 at 15:11 -0600, degski via Boost-users wrote:
> On 12 April 2018 at 13:48, David Demelier via Boost-users <boost-user
> s_at_[hidden]> wrote:
> > It looks like for some reasons that it still use boost::shared_ptr
> > instead of std::shared_ptr even though C++11 is 7 years old.
> >
> Boost needs to support (a.o.) VC7.1 till eternity (needs to run on
> WinXP), so this will stay this way forever... "We don't support
> VC7.1" or "Move on", is NOT an option in 2018 as far as Boost is
> concerned.
>
> degski
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
Wouldn't it be an option to test for the existence of std::make_shared.
This could be done using SFINAE. If it exists we can alias the
functionality from std:: into boost:: and if not we use the boost
implementation.
To make it less hairy the header could also be generated b2 before
building.
This way we maintain compatibility with older and competely unsupported
compilers running on unsupported operating systems (why are we doing
that again?) without causing interoperability trouble for others.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net