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

buffer should declare virtual dtor #1934

Closed
wants to merge 1 commit into from
Closed

buffer should declare virtual dtor #1934

wants to merge 1 commit into from

Conversation

Finkman
Copy link
Contributor

@Finkman Finkman commented Oct 14, 2020

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

@vitaut
Copy link
Contributor

vitaut commented Oct 14, 2020

Thanks for the PR but the destructor is non-virtual (and protected) intentionally.

@vitaut vitaut closed this Oct 14, 2020
@Finkman
Copy link
Contributor Author

Finkman commented Oct 14, 2020

hm.. interessting.
It will result in:
fmt/include/fmt/format.h:678:3: error: 'fmt::v7::basic_memory_buffer<wchar_t, 500, std::allocator<wchar_t> >' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]

Compiled with clang [6,7,10] and gcc [7.5]
Is it an issue?

@vitaut
Copy link
Contributor

vitaut commented Oct 15, 2020

It's a GCC bug 7302 but a PR to suppress the warning without making the dtor virtual is welcome.

@Finkman
Copy link
Contributor Author

Finkman commented Oct 16, 2020

It's a GCC bug 7302 but a PR to suppress the warning without making the dtor virtual is welcome.

I tried it with gcc 7.5, clang 9/10.
It seams that #1936 fixed it.

@vitaut
Copy link
Contributor

vitaut commented Oct 16, 2020

Thanks for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants