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 does not support C++17 #782

Open
ZRR666 opened this issue Mar 13, 2023 · 6 comments
Open

cereal does not support C++17 #782

ZRR666 opened this issue Mar 13, 2023 · 6 comments

Comments

@ZRR666
Copy link

ZRR666 commented Mar 13, 2023

cereal does not support C++17
The json format serialized in C++17 is incorrect
Serializing json results correctly in C++11 / C++14
How do I fix it to support C++17?

@ZRR666
Copy link
Author

ZRR666 commented Mar 15, 2023

image

If you use the C++17 standard library

@ZRR666
Copy link
Author

ZRR666 commented Mar 15, 2023

His serialization to json is an error result

@ZRR666
Copy link
Author

ZRR666 commented Mar 15, 2023

I use the VS2019 C++17 compiler

cereal 1.32

@ZRR666
Copy link
Author

ZRR666 commented Mar 15, 2023

image

@AzothAmmo
Copy link
Contributor

There is an important difference in your code that is causing this problem. See here: https://uscilab.github.io/cereal/quickstart.html and read the section "Serialize your data" note:

Important! If you didn’t read that paragraph about cereal using RAII, read it again! Some archives in cereal can only safely finish flushing their contents upon their destruction. Make sure, especially for output serialization, that your archive is automatically destroyed when you are finished with it.

@ZRR666
Copy link
Author

ZRR666 commented Apr 24, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants