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

Cereal override #23

Merged
merged 3 commits into from
Feb 11, 2020
Merged

Cereal override #23

merged 3 commits into from
Feb 11, 2020

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Feb 11, 2020

This picks up from David's cereal-override branch with a small (but quite obscure!) fix to use std::declval<Archive&> in the has_cereal_override probe. This is necessary because the signatures of nvp_adapter::apply and xdr::archive take their Archive parameter by non-const, non-rval reference (Archive&), and std::declval<Archive> alone resolves to an Archive&& which won't bind to Archive&. But if we call std::declval<Archive&> it's defined to return an Archive&.

(A lot of stackoverflow, C++ standard scrutiny and trial and error discovered this -- I would never have figured it out alone!)

@graydon graydon merged commit ae50149 into xdrpp:master Feb 11, 2020
@graydon
Copy link
Contributor Author

graydon commented Feb 11, 2020

(Discussed with David earlier and he approved merging this)

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.

1 participant