Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3022: Automatic conversion from Y* to boost::shared_ptr<Y> with std::pair
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-13 19:25:28
#3022: Automatic conversion from Y* to boost::shared_ptr<Y> with std::pair
------------------------------+---------------------------------------------
Reporter: koelsch_at_[hidden] | Owner: pdimov
Type: Bugs | Status: new
Milestone: | Component: smart_ptr
Version: Boost 1.39.0 | Severity: Problem
Resolution: | Keywords: implicit conversion shared_ptr
------------------------------+---------------------------------------------
Comment(by pdimov):
This is caused by std::pair's converting constructor:
{{{
template<class U, class V> pair<T1, T2>::pair( U const & u, V const & v ):
first( u ), second( v ) {}
}}}
and, unfortunately, there is nothing shared_ptr can do to stop it.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3022#comment:1> 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:00 UTC