Boost C++ Libraries: Ticket #5204: compile warning in serialization/extended_type_info.hpp on visual studio: c4265 https://svn.boost.org/trac10/ticket/5204 <p> class boost::serialization::extended_type_info generates warning <a class="ext-link" href="http://msdn.microsoft.com/en-us/library/wzxffy8c%28v=VS.90%29.aspx"><span class="icon">​</span>c4265</a> with visual studio 2005, 2008, and 2010 because the destructor is not virtual, even though the class has virtual functions. </p> <p> Looking at the class, I see that the warning was fixed only for gcc: </p> <pre class="wiki"> // account for bogus gcc warning #if defined(__GNUC__) virtual #endif ~extended_type_info(); </pre><p> I believe the fix is to always declare the destructor virtual. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5204 Trac 1.4.3 Robert Ramey Sat, 19 Feb 2011 17:49:40 GMT <link>https://svn.boost.org/trac10/ticket/5204#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5204#comment:1</guid> <description> <p> The reason this "virtual" is not necessary is that the destructor is protected so it cannot be called directly so there is no need to add a new member to the virtual function table. GCC doesn't have a convenient way to suppress bogus warnings so to avoid this warning I had to do this. This is basically the wrong thing to do but if I don't do it, I get complaints about "bugs" in the library. If you want to suggest the usaage of a praga or something for msvc - I'll put it in. </p> <p> Robert Ramey </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Sun, 31 Jul 2011 18:03:55 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5204#comment:2 https://svn.boost.org/trac10/ticket/5204#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> Ticket Jonathan Jones <jonathan.jones@…> Wed, 01 Aug 2012 20:22:54 GMT cc set https://svn.boost.org/trac10/ticket/5204#comment:3 https://svn.boost.org/trac10/ticket/5204#comment:3 <ul> <li><strong>cc</strong> <span class="trac-author">jonathan.jones@…</span> added </li> </ul> Ticket