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

Cleanly compile cereal for C++20 #639

Closed

Conversation

lukaszgemborowski
Copy link
Contributor

This is possible solution to problem outlined in issue #638
Tested on g++-10 (Ubuntu 10-20200416-0ubuntu1~18.04) 10.0.1 20200416 (experimental) [master revision 3c3f12e2a76:dcee354ce56:44b326839d864fc10c459916abcc97f35a9ac3de] , c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 and g++ (GCC) 9.3.0 with cmake -DSKIP_PORTABILITY_TEST=ON

implicit 'this' capture is deprecated in C++20
has_insertion_operator specialization for wchar_t fails to compile
starting from C++20 as now operator<<(ostream&, wchar_t) is explicitly
marked as deleted
there's dependency to boost::format which fails to compile
when C++20 is enabled (GCC trunk/10 + boost 1.72.0)
@AzothAmmo
Copy link
Contributor

Regarding the doctest changes - has this been fixed in upstream doctest? That'd be the best way to address this instead of us having to maintain changes to our local embedded doctest.

Also, with regards to boost, this again sounds like something that is/will be fixed in a later release of boost, especially in regards to removed C++20 features.

I think it'd be best if you could break out your changes to two PRs- one with the fix for the lambda capture and one with the other changes. I'll merge the lambda change asap, the others I'd rather delay until checking in on upstream fixes.

@lukaszgemborowski
Copy link
Contributor Author

Ok, I'll create a separate PR for the lambda captures. I'll also try to upstream the doctest change to their repository and then we can come back with a back-merge to cereal. The only thing left will be dependency to boost::format in the performance.cpp. I'm not feeling comfortable with changing anything in boost. :-)

@lukaszgemborowski
Copy link
Contributor Author

I've opened the issue against doctest project: doctest/doctest#357 let's see what happens. I'll close this PR for now and update the #638 just to track things.

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.

2 participants