Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2508: Serialization emits lots of warnings for MSVC7.1 (non-polymorphic / shared_ptr)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-07-30 13:38:50
#2508: Serialization emits lots of warnings for MSVC7.1 (non-polymorphic /
shared_ptr)
----------------------------------------------------------+-----------------
Reporter: Chard | Owner: ramey
Type: Bugs | Status: assigned
Milestone: Boost 1.38.0 | Component: serialization
Version: Boost 1.36.0 | Severity: Problem
Keywords: non-polymorphic shared_ptr warnings MSVC 7.1 |
----------------------------------------------------------+-----------------
Comment(by Chard):
In class: extended_type_info_typeid
Function:
{{{
const extended_type_info *
get_derived_extended_type_info(const T & t) const {
// note: this implementation - based on usage of typeid (rtti)
// only does something if the class has at least one virtual
function.
BOOST_STATIC_WARNING(boost::is_polymorphic<T>::value);
return
detail::extended_type_info_typeid_0::get_extended_type_info(
typeid(t)
);
}
}}}
The 'warning' that the class should be polymorphic is incorrect, as
illustrated by this issue.
The reason this issue has not shown itself to gcc users is that the gcc
static warning macro does not appear to work.
We've investigated the division-by-zero method (for gcc 3.3), and it
appears that gcc doesn't bother stamping out the "struct
STATIC_WARNINGxxxx". By declaring an actual instance of the
STATIC_WARNINGxxxx struct and then calling the f() method on it, the
warnings then start trailing outâ¦
In this case, MSVC71 is doing the 'right thing'.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2508#comment:3> 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