-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Building with C++17 standard and Boost results in use of removed functions #2634
Comments
That's great information! We're looking to move to C++17 so we can replace some boost classes (like boost::optional) with their std equivalents as part of the de-boostification effort. It looks like we'll need to set that BOOST_NO_CXX98_FUNCTION_BASE in our CMake in the interim. Thanks for the heads-up! |
We probably need to also publish |
Filed as internal issue #USD-8638 |
It should be relatively straight forward to replace |
…a stopgap to get us over a C++17 upgrade hurdle, and is intended to be replaced by more thorough work by mkuruc. Fixes #2634 (Internal change: 2294196)
Hey @dgovil, we have not removed all uses of boost::hash but the C++17 issue should be addressed by a couple of changes: |
Awesome. Thanks, @sunyab. I'll close this issue out since it's not blocking anymore. |
@dgovil @sunyab I'm still have this issue with 23.11 compiled with python support:
Apple clang version 15.0.0 (clang-1500.0.40.1) I can confirm that adding |
This is more of an informational issue rather than anything dire, but I figure it's good to log it, since I know I'm not the only one trying to build USD as C++17. However, Boost is an issue because Boost has a bunch of functions that are removed from C++17 as the default pathway.
A lot of USD files use the Boost
hash.hpp
file that makes use of the deprecated std::unary_function call by default.Depending on your compiler version, this will print a warning (if its deprecated but not removed), but starting with the most recent clang versions (as of macOS 14 / Xcode 15 for example), it is actually removed, resulting in this error:
There's a couple workarounds for this, until USD is successfully de-boosted.
add_compile_definitions(BOOST_NO_CXX98_FUNCTION_BASE)
to your CMake file somewhere, or just make sure it's defined before Boost is included. That is used across various Boost functions and makes Boost be C++17 compatible.Anyway, again, not so much something that explicitly needs solving. I'm just putting this up as an FYI for anyone else hitting it.
I assume that when USD moves to C++17, that the define will need to be set, or we'll be free of boost before then.
The text was updated successfully, but these errors were encountered: