[Smart Pointers] compilation error with ver 1.44 and VC 9

Hi, after switching to version 1.44 my projects using make_shared won't compile anymore. I'm using the VC 9 compiler on a Windows 2003 Server. I'm confused that nobody else seems to have the same problem with make_shared, so here is a small example: /////////////////////////////////////////////////////////////////////////////// #define BOOST_NO_TYPEID #include <boost/smart_ptr.hpp> #include <boost/make_shared.hpp> struct test { test(){} int i; }; int main(int argc, char* argv[]) { boost::shared_ptr<test> spt = boost::make_shared<test>(); return 0; } ///////////////////////////////////////////////////////////////////////////////// this compiles fine with Boost 1.43, but with version 1.44 I get the following error: boost/detail/sp_typeinfo.hpp(77) : error C2440: 'Initialisierung': 'const char *' kann nicht in 'boost::detail::sp_typeinfo' konvertiert werden (in english: 'const char *' cannot be converted to 'boost::detail::sp_typeinfo') In version 1.43 the line in sp_typeinfo.hpp(77) was: template<class T> sp_typeinfo sp_typeid_≤ T >::ti_( sp_typeid_≤ T >::name() ); so, the explicit-marked ctor was called. In version 1.44 it changed to template<class T> sp_typeinfo sp_typeid_≤ T >::ti_ = sp_typeid_≤ T >::name(); and the explicit-marked ctor won't be called anymore. The change message (https://svn.boost.org/trac/boost/changeset/62245/trunk/boost/detail/sp_typei...) refers to some fix for Sun C++. IMO the change should better be guarded by some compiler/platform-detection macro. Tobias PS: I already posted this message on 18 Aug but accidentially as a reply to another thread.

Hi,
after switching to version 1.44 my projects using make_shared won't compile anymore. I'm using the VC 9 compiler on a Windows 2003 Server.
...
The change message (https://svn.boost.org/trac/boost/changeset/62245/trunk/boost/detail/sp_typei...) refers to some fix for Sun C++. IMO the change should better be guarded by some compiler/platform-detection macro.
Can you please reopen the offending ticket with an appropriate comment so the issue doesn't get lost? Thanks.

Hi, thanks for the answer. As suggested, I've reopened the tivket, but as I'm not familiar with the Sun Studio, I would prefer somebody else doing the patch. Tobias
participants (2)
-
Löw, Tobias (Evonik Energy Services GmbH)
-
Peter Dimov