Subject: [Boost-bugs] [Boost C++ Libraries] #3856: ambiguities with make_shared() function pointers with C++0x
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-22 21:27:13
#3856: ambiguities with make_shared() function pointers with C++0x
--------------------------------------------------------------+-------------
Reporter: Georg Fritzsche <georg.fritzsche@â¦> | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.42.0 | Component: None
Version: Boost 1.41.0 | Severity: Problem
Keywords: |
--------------------------------------------------------------+-------------
Trying to store a function pointer to make_shared<Arg1> results in
ambiguity errors in gcc (4.3.) with C++0x support being enabled.
The following:
typedef boost::shared_ptr<int>(*FP)();[[BR]]
FP fp = boost::make_shared<int>;
leads to:
error: converting overloaded function âmake_sharedâ to type âclass
boost::shared_ptr<int> (*)()â is ambiguous[[BR]]
boost_1_41_0/boost/smart_ptr/make_shared.hpp:100: error: candidates are:
boost::shared_ptr<X> boost::make_shared() [with T = int][[BR]]
boost_1_41_0/boost/smart_ptr/make_shared.hpp:138: error:
boost::shared_ptr<X> boost::make_shared(Args&& ...) [with T = int, Args =
][[BR]]
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3856> 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:02 UTC