Opened 3 years ago

Last modified 10 months ago

#11107 assigned Tasks

A lot of warnings on MSVC due to protected destructor being non-virtual

Reported by: Raffi Enficiaud Owned by: Raffi Enficiaud
Milestone: Boost 1.65.0 Component: test
Version: Boost 1.57.0 Severity: Cosmetic
Keywords: MSVC warnings Cc:


See pull-request

The fact that the destructor is non virtual looks like a bug to me. This was introduced in 2005, rev ef3fe4a826ebc31afbbb4c781dd3d9e504f360f1, with a commit log message "dll support introduced". It sounds like it has connection with the visibility of the destructors across dll/so boundaries, maybe for some broken compiler.

I am in favor of removing this workaround.

Attachments (1) (9.5 KB) - added by Jürgen Hunold 3 years ago.
virtual destructor error log

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by Jürgen Hunold

Full log "" attached. Commandline:

..\..\..\b2 -a cxxflags=-we4265 -j3 2>&1 | "C:\Program Files (x86)\git\bin\tee.exe" virtual.log

See for the official description. We normally make this a level 3 warning, I've changed this to an error to get clearer test result.

comment:2 Changed 3 years ago by Raffi Enficiaud

Thanks. So I'm not addressing the trillion of warnings from error_info_container in boost.exception.

The warning for collection is indeed a true one, good catch! I am adding a virtual destructor to class dataset, which should solve most of the issues in your log.

However, this has nothing to do with the pull request in fact (and Gennadiy was right). The macro that gets activated with your change does not solve the problem I can see in this log.

comment:3 Changed 3 years ago by Raffi Enficiaud

Owner: changed from Gennadiy Rozental to Raffi Enficiaud

comment:4 Changed 3 years ago by Raffi Enficiaud

Status: newassigned

Changed 3 years ago by Jürgen Hunold

Attachment: added

virtual destructor error log

comment:5 Changed 3 years ago by Jürgen Hunold

Sorry, I had the patch still active when doing the first run. Uploaded the correct run.

comment:6 Changed 3 years ago by Raffi Enficiaud

A quick look at this tells me that most of the warnings can be safely ignored: in fact most of the instances are not meant to be used on the heap, but rather on the stack.

I will have a deeper look tonight/tomorrow.

comment:7 Changed 10 months ago by Raffi Enficiaud

Milestone: To Be DeterminedBoost 1.65.0

Modify Ticket

Change Properties
Set your email in Preferences
as assigned The owner will remain Raffi Enficiaud.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.