Subject: [Boost-bugs] [Boost C++ Libraries] #1468: [typeof] Problems with VC8/VC9 when using code analysis
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-21 21:58:18
#1468: [typeof] Problems with VC8/VC9 when using code analysis
---------------------------------------------------------+------------------
Reporter: Richard Webb <richard.webb_at_[hidden]> | Owner: burbelgruff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: typeof
Version: Boost Development Trunk | Severity: Problem
Keywords: |
---------------------------------------------------------+------------------
Enabling the Code Analysis option in VC8SP1 and VC9 causes native typeof
to fail. For example, the code:
{{{
BOOST_AUTO(tmp, std::make_pair(1, 2));
}}}
results in the error:
{{{
E:\Development\BoostSVN\boost/typeof/msvc/typeof_impl.hpp(172) : error
C2975: 'ref_type_info' : invalid template argument for
'boost::type_of::msvc_typeid_wrapper', expected compile-time constant
expression
1> E:\Development\BoostSVN\boost/typeof/msvc/typeof_impl.hpp(174) :
see reference to class template instantiation
'boost::type_of::encode_type<T>' being compiled
1>E:\Development\BoostSVN\boost/typeof/msvc/typeof_impl.hpp(172) : error
C2440: 'specialization' : cannot convert from 'int' to 'const type_info &'
1>E:\Development\BoostSVN\boost/typeof/msvc/typeof_impl.hpp(172) : error
C2975: 'ref_type_info' : invalid template argument for
'boost::type_of::msvc_typeid_wrapper', expected compile-time constant
expression
1> .\Stuff.cpp(19) : see reference to class template instantiation
'boost::type_of::encode_type<T>' being compiled
1> with
1> [
1> T=std::pair<int,int>
1> ]
1>E:\Development\BoostSVN\boost/typeof/msvc/typeof_impl.hpp(172) : error
C2440: 'specialization' : cannot convert from 'int' to 'const type_info &'
1>.\Stuff.cpp(19) : error C2975: 'ref_type_info' : invalid template
argument for 'boost::type_of::msvc_typeid_wrapper', expected compile-time
constant expression
1>.\Stuff.cpp(19) : error C2440: 'specialization' : cannot convert from
'int' to 'const type_info &'
1>.\Stuff.cpp(19) : error C2440: 'specialization' : cannot convert from
'int' to 'const type_info &'
1> .\Stuff.cpp(19) : see reference to class template instantiation
'boost::type_of::msvc_typeid_wrapper<ref_type_info>' being compiled
1> with
1> [
1> ref_type_info=0x0
1> ]
1>.\Stuff.cpp(19) : error C2973: 'boost::type_of::msvc_typeid_wrapper' :
invalid template argument 'int'
}}}
Everything is ok when analysis is disabled.
I've previously been using a Boost1.34.1 patched with the first version of
typeof with VC8 native support, and that works ok in either case.
Looking through the change history, it seems to have started failing at
revision 38801.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1468>
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:49:57 UTC