-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: activate virtual destructors for all msvc versions #41
Conversation
Why do we need this? On Sun, Mar 8, 2015 at 12:45 PM, Jürgen Hunold notifications@github.com
Gennadiy Rozental |
msvc will issue warnings about the destructors being not virtual. There is no need to make this dependent on the compiler version as all version complain. Another solution would be to disable this via #pragma . Or just make the destructor virtual by default, as gcc and clang are already doing this. |
Can we file a bug report with MSVC compiler? On Mon, Mar 9, 2015 at 4:33 AM, Jürgen Hunold notifications@github.com
Gennadiy Rozental |
FYI, I created the ticket https://svn.boost.org/trac/boost/ticket/11107. It looks to me that non-virtual is a bug, but I do not understand the first intention of this workaround. Any hint? (some more details in the ticket) |
destructor of base class should be either virtual or protected. I chose On Wed, Mar 11, 2015 at 6:19 PM, Raffi Enficiaud notifications@github.com
Gennadiy Rozental |
You're right. However, protected + virtual does not harm neither? On the other hand, I cannot see any warning with |
Right, added full log to the ticket. I've just made the warning an error to just clarify things. @rogeeff All major compilers warn about this (gcc,clang and msvc) so I doubt they are all wrong. I've only found
So that is a guideline from 14 years ago. I*d really like to know if this is still valid or the exact paragraph of the standard handling this. |
Hi, Would you please try the develop branch again for this warning? The log you sent were not on the protected part, see commit 653aae5 |
Uploaded a new log to the ticket. I had the patch active when doing the test run. I really should create the working branch before committing. |
Superseded/addressed by 13ca3e0 |
Merged to master |
All msvc version spew out warnings so make the destructors virtual for all.