[sdf] Fix for PXR_STRICT_BUILD_MODE with wrap of SdfLayer::Traverse #1074
+7
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change(s)
This fixes a build issue introduced by:
[sdf] wrap SdfLayer::Traverse.
2357a7b
...when building with PXR_STRICT_BUILD_MODE + gcc 6 + boost 1.61.
The fix is the same applied by:
Locally disable placement-new warnings in later versions of gcc.
898b8c1
Note - this was fixed in boost 1.62:
boostorg/function#9
Since this placement-new problem is only a problem on specific versions of boost, I wonder if we should add a boost-version check to the places where ARCH_PRAGMA_PLACEMENT_NEW is used?
Alternatively, since vfxplatform-CY2019 is already advocating 1.66 (where this is not an issue), I wonder if it might be better to provide a more "general" solution, by doing a check at the CMAKE level... and if PXR_STRICT_BUILD_MODE is used, and we're using gcc 6+, AND we're using boost<1.62, we simply add a "-Wno-placement-new".
Fixes Issue(s)