Skip to content

Serialization of std::chrono between GNU GCC and LLVM Clang not compatible #868

Description

@marcosbento

It is known that GNU GCC's standard library implementation currently uses std::chrono::nanoseconds ticks, while LLVM Clang's standard library implementation uses std::chrono::microseconds ticks. This mismatch is disregarded by the current Cereal implementation (https://github.com/USCiLab/cereal/blob/master/include/cereal/types/chrono.hpp), which serializes ticks regardless of units, and makes an object serialized in GCC incompatible with the one serialized in LLVM.

Could we consider updating Cereal's implementation to always convert to/from std::chrono::nanoseconds, and thus ensure compatibility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions