cereal icon indicating copy to clipboard operation
cereal copied to clipboard

cereal does not support C++17

Open ZRR666 opened this issue 2 years ago • 6 comments

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 avatar Mar 13 '23 16:03 ZRR666

image

If you use the C++17 standard library

ZRR666 avatar Mar 15 '23 03:03 ZRR666

His serialization to json is an error result

ZRR666 avatar Mar 15 '23 03:03 ZRR666

I use the VS2019 C++17 compiler

cereal 1.32

ZRR666 avatar Mar 15 '23 05:03 ZRR666

image

ZRR666 avatar Mar 15 '23 05:03 ZRR666

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.

AzothAmmo avatar Apr 24 '23 03:04 AzothAmmo

ok

------------------ 原始邮件 ------------------ 发件人: "Shane @.>; 发送时间: 2023年4月24日(星期一) 中午11:14 收件人: @.>; 抄送: " @.>; @.>; 主题: Re: [USCiLab/cereal] cereal does not support C++17 (Issue #782)

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.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ZRR666 avatar Apr 24 '23 03:04 ZRR666