#5204 closed Bugs (wontfix)
compile warning in serialization/extended_type_info.hpp on visual studio: c4265
Reported by: | Owned by: | Robert Ramey | |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: | jonathan.jones@… |
Description
class boost::serialization::extended_type_info generates warning c4265 with visual studio 2005, 2008, and 2010 because the destructor is not virtual, even though the class has virtual functions.
Looking at the class, I see that the warning was fixed only for gcc:
// account for bogus gcc warning #if defined(__GNUC__) virtual #endif ~extended_type_info();
I believe the fix is to always declare the destructor virtual.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 10 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.
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.
Robert Ramey