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

boost::compressed_pair can be replaced with explicit empty base optimization #2257

Closed
nvmkuruc opened this issue Feb 8, 2023 · 3 comments
Closed

Comments

@nvmkuruc
Copy link
Collaborator

nvmkuruc commented Feb 8, 2023

Description of Issue

boost::compressed_pair is being leveraged in TfDense{Map,Set} to take advantage of the empty base optimization for the Hashing and Equality types. This can be done explicitly with private inheritance on the containers.

Longer term, the [[no_unique_address]] attribute should be considered when C++20 is an option.

Steps to Reproduce

N/A

System Information (OS, Hardware)

N/A

Package Versions

N/A

Build Flags

N/A

@nvmkuruc
Copy link
Collaborator Author

nvmkuruc commented Feb 8, 2023

I have a fix.

@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-7991

@nvmkuruc
Copy link
Collaborator Author

This was addressed by #2522 and #2257

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

No branches or pull requests

2 participants