Re: [Boost-bugs] [Boost C++ Libraries] #11259: boost::movelib::unique_ptr is not convertible to boost::shared_ptr

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11259: boost::movelib::unique_ptr is not convertible to boost::shared_ptr
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-03 22:24:17


#11259: boost::movelib::unique_ptr is not convertible to boost::shared_ptr
-------------------------------------------+-----------------------
  Reporter: Tavian Barnes <tavianator@…> | Owner: pdimov
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: smart_ptr
   Version: Boost 1.58.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------------------+-----------------------

Comment (by pdimov):

 Well, not exactly fixed. Under g++ (in C++03 mode) at least, your code
 still doesn't work. You need to do

 {{{
 mystd::shared_ptr<int> get_thing() {
         mystd::shared_ptr<int> r( load_thing() );
         return r;
 }
 }}}

 This:

 {{{
         mystd::shared_ptr<int> r = load_thing();
 }}}

 doesn't work either.

 VC++ doesn't mind.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11259#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC