cereal v1.1.0 Release Notes

Release Date: 2015-01-19 // over 9 years ago
  • ๐Ÿš€ This is a minor feature and bug fix release for cereal.

    ๐Ÿš€ This is our first release since 1.0, and the first release with significant contribution from the community, which will only increase with 1.2. cereal would like to thank its users and contributors for helping make this release possible.

    Notable changes include:

    • cereal serialization functions (e.g. load/save/serialize) can now be easily renamed via macros in cereal/macros.hpp (thanks to @mattyclarkson, #60)
    • XML archives properly handle whitespace in text (thanks to @volo-zyko, #109)
    • Class versioning and polymorphic registration work properly with shared libraries (thanks in part to @ImplOfAnImpl, #113, #137)

    ๐Ÿ›  Minor fixes and enhancements include:

    • ๐Ÿ›  Fixed issues related to long serialization on OSX using libc++ (#81)
    • ๐Ÿ›  Fixed support of char serialization for XML archives (#116)
    • ๐Ÿ›  Fixes and enhancements related to minimal serialization (#79, #80)
    • Properly utilizing R-values in various internal containers (#96)
    • ๐Ÿ‘Œ Improved support for ICC (Intel C++ compiler) (#120)
    • ๐Ÿ‘€ Tuple elements are now serialized in proper order with unique names in text archives (thanks in part to @erichkeane, #143). See breaking changes for a special note on this.
    • โž• Additional miscellaneous bug fixes and code refactoring.

    ๐Ÿ‘€ See the closed issues for more information.

    ๐Ÿ’ฅ Breaking Changes:

    ๐Ÿš€ This release introduces two breaking changes. The first will affect any user that created a custom serialization archive and utilizes minimal serialization functions with that archive:

    In fixing #79, we introduced the concept of relating input and output archives using type traits. You now need to use the macro CEREAL_SETUP_ARCHIVE_TRAITS(InArchive, OutArchive) for your custom archives if you wish to support minimal serialization. You can look at the source of any of the cereal provided archives to see an example of this.

    In addition, in fixing #80, we introduced a traits class that text based archives should inherit from. This has been applied to JSON and XML archives, but any users with custom text based archives are encouraged to have their text archive inherit from cereal::traits::TextArchive. This is not currently used internally by cereal but may be used by users with the new cereal::traits::is_text_archive traits class.

    ๐Ÿ‘€ The second breaking change has to do with tuple serialization. We fixed the order of tuple serialization to go in ascending (get<0>(), get<1>()) instead of descending order. See #143 for more information.

    Known Issues

    There is currently an error in the compile-time type checking that cereal performs on non-member load_minimal functions that will cause a static_assertion to mistakenly prevent compilation from succeeding. This only affects users using non-member load_minimal functions where the type to support load_minimal requires an unknown template parameter. See #132 for more information and workarounds. This is scheduled to be fixed in the next release.

    Various cereal macros such as CEREAL_REGISTER_TYPE do not work properly when used with templated class arguments (e.g. MyClass<OtherType>). You can use a typedef (e.g. using SingleName = MyClass<OtherType>) to avoid the issue. See #141 for the future solution we will use.

    Upcoming Changes

    ๐Ÿ‘€ The next version of cereal will introduce cereal modules, which will be collections of serialization functions or archives for types outside of the standard library. These will exist outside of the main cereal distribution to avoid cluttering the core of cereal. See https://github.com/USCiLab/cereal/labels/module for more information.

    ๐Ÿš€ To see what else is upcoming in the next release, check out milestone 1.2.