-
Notifications
You must be signed in to change notification settings - Fork 761
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 and C++20 #638
Comments
doctest fix is now merged into the dev branch. In parallel I was trying to use boost::format() from the latest boost develop branch and it seem to compile well with -std=c++20 switch on gcc 10. I'll try to setup a fresh environment to compile cereal with latest versions of boost and doctest and see if everything's fine, potentially closing this issue. |
Why not use the fmt lib instead of boost format? It's going to be in C++20 anyways. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->Great – thanks for the update. If this looks to fix things I’ll update our internal doctest. From: Łukasz GemborowskiSent: Thursday, June 11, 2020 9:30 AMTo: USCiLab/cerealCc: SubscribedSubject: Re: [USCiLab/cereal] Cereal and C++20 (#638) doctest fix is now merged into the dev branch. In parallel I was trying to use boost::format() from the latest boost develop branch and it seem to compile well with -std=c++20 switch on gcc 10. I'll try to setup a fresh environment to compile cereal with latest versions of boost and doctest and see if everything's fine, potentially closing this issue.—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
I'm trying to use cereal library in my C++20 pet project (using current gcc 10 snapshot). As far as the library is considered there's only one issue (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html), implicit 'this' capture in two lambdas in cereal.hpp which results in a warning. Quite easy to fix. But there are two more "complicated" issues within tests:
basic_string.cpp - as far as I understand the error is in doctest
has_insertion_operator
trait. The root cause of this is:operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
(yes, this is explicitly deleted in C++20 stdlib). Assuming we aim at C++11 and onwards we can replace the check with slightly modified version of answer from SO: https://stackoverflow.com/a/22759544 - at least it won't fail to compile with C++2a enabled. The question is if we want to modify it in place or rather target to fix it upstream?performance.cpp - this one I don't have idea how to approach. The problem is in boost library, basically boost::format won't compile with C++20 because it use two argument Allocator::allocate somewhere deep. This was removed in C++20.
Any thoughts?
Things to fix
The text was updated successfully, but these errors were encountered: