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

Replace boost::variant with std::variant in sdf #2718

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

nvmkuruc
Copy link
Collaborator

@nvmkuruc nvmkuruc commented Sep 20, 2023

Description of Change(s)

This replaces boost::variant with std::variant in sdf. The API uses boost::bad_get to communicate a failure to parse due to a bad variant access or an out of range error. This change remaps the STL std::bad_variant_access to a boost::bad_get to preserve this behavior. As visitors used via std::visit do not specify result_type, the return type for several helper methods has been converted to auto.

One or more follow up changes will be needed to remove a spurious include of boost/variant.hpp from the parser logic and replace boost::bad_get with a new proposed Sdf_BadGet exception.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8739

@pixar-oss pixar-oss merged commit 1e3e20f into PixarAnimationStudios:dev Nov 1, 2023
3 of 5 checks passed
@nvmkuruc nvmkuruc deleted the sdfvariant branch December 29, 2023 03:12
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.

3 participants