-
-
Notifications
You must be signed in to change notification settings - Fork 963
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 -Wsubobject-linkage warning #6243
Conversation
Having tk::spline header-only implementation included from SmallAreaInfillFlowCompensator.hpp makes SmallAreaInfillFlowCompensator::flowModel have separate (albeit the same) implementation in each translation unit. In order to fix this issue, SmallAreaInfillFlowCompensator::flowModel converted to opaque 'pimpl'
@mjonuschat , could you please help review this change? |
Just found that PR #5963 adds warning suppression using pragmas. Unfortunately, this leads to
Which adds extra points to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks good.
I'm not very clear about the purpose of TK_SPLINE_OUTER_NAMESPACE
macro, could you explain it?
Types within anonymous namespace cannot be forward declared. I've added a macro to keep an option to include spline.h within anonymous workspace if needed. |
Would it be simpler if we move the spline out of the anonymous namespace? |
That would also work. |
Remove outer anonymous namespace from splice.h to make forward declaration for tk::spline possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Thank you
Description
Having tk::spline header-only implementation included from SmallAreaInfillFlowCompensator.hpp makes
SmallAreaInfillFlowCompensator::flowModel have separate (albeit the same) implementation in each translation unit.
In order to fix this issue, SmallAreaInfillFlowCompensator::flowModel converted to opaque 'pimpl'
Tests
Fixes ~240 compilation warnings