Boost logo

Boost :

Subject: [boost] [Smart Pointers] compilation error with MSVC 9 if BOOST_NO_TYPEID is defined
From: Evonik Energy Services GmbH (tobias.loew_at_[hidden])
Date: 2010-08-18 04:42:21


Hi,

I just switched from version 1.43 to 1.44 and now I get the following compilation 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')

I have BOOST_NO_TYPEID defined and using a MSVC 9 compiler.

In version 1.43 the line was:

template<class T> sp_typeinfo sp_typeid_< T >::ti_( sp_typeid_< T >::name() );

so, the explicit 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 ctor won't be called anymore.

The change message (https://svn.boost.org/trac/boost/changeset/62245/trunk/boost/detail/sp_typeinfo.hpp) refers to some fix for Sun C++.
IMO the change should better be guarded by some compiler-detection macro.

Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk