Skip to content
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

Make map deconstructor virtual #27866

Closed
wants to merge 1 commit into from

Conversation

ifreund
Copy link
Contributor

@ifreund ifreund commented Jan 25, 2019

Summary

SUMMARY: Bugfixes "Make map deconstructor virtual."

Purpose of change

Fixes build error (at least on macOS) and possible undefined behavior caused by #27853 .

Describe the solution

Makes the deconstructor for map virtual. I'm pretty sure this is the right thing to do in this case.

See: this stackoverflow question for some info on virtual destructors.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels Jan 25, 2019
@ZhilkinSerg ZhilkinSerg added this to the 0.D milestone Jan 25, 2019
Copy link
Contributor

@mlangsdorf mlangsdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the bug on Linux, too.

@kevingranade
Copy link
Member

Rebased while merging so github didn't auto-close.

@ifreund ifreund deleted the fix-build-mac branch February 5, 2019 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants