All Versions
25
Latest Version
Avg Release Cycle
92 days
Latest Release
510 days ago

Changelog History
Page 2

  • v4.6.0 Changes

    March 12, 2019

    ๐Ÿ”‹ Features

    • new extensions StdTuple and StdVariant for std::tuple and std::variant. These are the first extensions that requires C++17, or higher, standard enabled. Although std::tuple is C++11 type, but from usage perspective it has exactly the same requirements as std::variant and relies heavily on having class template argument deduction guides to make it convenient to use. You can easily use std::tuple without any extension at all, so the main motivation was to create convenient interface for StdVariant and use the same interface for StdTuple as well.
      • instead of providing custom lambda to overload each type in tuple or variant, there was added several helper callable objects. OverloadValue wrapper around s.value<N>(o), OverloadExtValue wrapper around s.ext<N>(o, Ext{}) and OverloadExtObject wrapper around s.ext(o, Ext{}).
    • new extensions StdDuration and StdTimePoint for std::chrono::duration and std::chrono::time_point.

    ๐Ÿ‘Œ Improvements

    tests now uses gtest_discover_tests function, to automatically discover tests, which requires CMake 3.10.

  • v4.5.1 Changes

    January 16, 2019

    ๐Ÿ‘Œ Improvements

    • template specializations, where possible, was changed to avoid using variadics, some Visual Studio compilers has issues with variadic templates.
    • โฌ‡๏ธ reduced compile warnings for VisualStudio:
      • added explicit casts
      • renamed struct to class where class is used as friend. e.g. friend class bitsery::Access, because it is more conventional usage.
  • v4.5.0 Changes

    January 10, 2019

    ๐Ÿ”‹ Features

    • 0๏ธโƒฃ ability to create non default constructible objects, by defining private default constructor and making friend class bitsery::Access; to access it. It is not necessary to enforce class invariant immediately, because internal object representation will be overriden anyway.

    ๐Ÿ‘Œ Improvements

    • ๐Ÿ‘ StdSmartPtr supports std::unique_ptr with custom deleter.
    • *InputBufferAdapter(all) can also accept const buffer;

    ๐Ÿ› Bug fixes

    • ๐Ÿ›  fixed deserialization in bitsery/ext/std_map{set} when target container is not empty.
    • โž• added missing template parameters for specializations on std containers in multiple files in bitsery/ext/*.
  • v4.4.0 Changes

    January 08, 2019

    ๐Ÿ”‹ Features

    • new extensions CompactValue and CompactValueAsObject, stores integral values in less space if possible. This is useful when you're working with mostly small values, that in rare cases can be large. E.g. int64_t money = 8000; will only use 2 bytes, instead of 8. CompactValueAsObject allows to use ext() overload, without specifying size of underlying type and sets BUFFER_OVERFLOW error if value doesn't fit in underlying type during deserialization.

    ๐Ÿ‘Œ Improvements

    • improved PolymorphicContext, allows to extend already registered hierarchy in one translation unit, using different type other than PolymorphicBaseClass to avoid symbol collision between translation units or libraries. 0๏ธโƒฃ registerBasesList was modified, so that it could accept user defined type (instead of PolymorphicBaseClass) that is used to declare hierarchy, by default it is PolymorphicBaseClass. This introduced breaking change, for those who used this syntax (registerBasesList<MySerializer, Shape>({})) during registration. It is encouraged to define helper type, that could be used for registering hierarchy for serialization and deserialization [example](examples/smart_pointers_with_polymorphism.cpp). This is only relevant then you want to use **PolymorphicContext** between different translation units or libraries. ```cpp //libA namespace bitsery { namespace ext { template<> struct PolymorphicBaseClass : PolymorphicDerivedClasses {}; } } using MyPolymorphicClassesForRegistering = bitsery::ext::PolymorphicClassesList; ... ctx.registerBasesList(MyPolymorphicClassesForRegistering{}).

    //otherLib struct MySquare: Shape {...} //now it must define different type (exactly the same as PolymorphicBaseClass) to declare hierarchy template struct MyHierarchy { using Childs = PolymorphicClassesList<>; };

    template <> struct MyHierarchy: bitsery::ext::bitsery::ext::PolymorphicClassesList {}; ... //notice that we pass MyHierarchy as second argument ctx.registerBasesList(MyPolymorphicClassesForRegistering{}).

    * **PolymorphicContext** also get optional method `registerSingleBaseBranch`, that allows manually register hierarchies, this might be more convenient when using you need to register in different translation units (or libraries), but it is error-prone.
    
  • v4.3.0 Changes

    August 23, 2018

    ๐Ÿ”‹ Features

    • โž• added runtime polymorphism support for pointer like types (raw and smart pointers). In order to enable polymorphism new PolymorphicContext was created. It provides capability to register classes with serializer/deserializer.
      • runtime polymorphism can be customized, by replacing StandardRTTI from header.
    • added smart pointers support for std::unique_ptr, std::shared_ptr and std::weak_ptr via StdSmartPtr extension.
    • new UnsafeInputBufferAdapter doesn't check for buffer size on deserialization, on some compilers can improve deserialization performance up to ~40%.

    ๐Ÿ‘Œ Improvements

    • creatly improved interface for extending/implementing support for pointer like types. Now all pointer like types extends from PointerObjectExtensionBase and implements/configures required details.
    • reimplemented PointerOwner, PointerObserver, ReferencedByPointer.
    • reimplemented PointerLinkingContext to properly support shared objects and runtime polymorphism, pointer ownership for shared objects now has two states: SharedOwner e.g. std::shared_ptr and SharedObserver std::weak_ptr.

    Other notes

    There is one minor? issue/limitation for pointer like types that uses virtual inheritance. When several pointers points to same object through different static type. it will not work correctly e.g.:

    struct Derived: virtual Base {...};
    struct MyData {
        std::shared_ptr<Derived> sptr;
        std::weak_ptr<Base> wptddr;
    }
    

    In this example wptr and sptr have different static type, and Derived is virtually inherited from Base, so I get different pointer address for different types.

  • v4.2.1 Changes

    March 09, 2018

    ๐Ÿ‘Œ Improvements

    • changed CMake structure, to follow Modern CMake principles.
      • bitsery now has install target and find_package(Bitsery) exports Bitsery::bitsery target.
      • GTest no longer downloads as external application, but tries to find via find_package.
      • removed ext folder, and instead added scripts folder that contains few helper scripts for development, currently tested on Ubuntu.
    • ๐Ÿ›  fixed/added few tests cases.

    Other notes

    • ๐ŸŽ some work was done on polymorphism support, but current solution, although working, but has many design and performance issues, and interfaces for extensibility might change drastically.
  • v4.2.0 Changes

    November 12, 2017

    ๐Ÿ”‹ Features

    • serializer/deserializer can now have internal context(s) via configuration. 0๏ธโƒฃ It is convenient way to pass context, when it doesn't convey useful information outside of serializer/deserializer and is default constructable.
    • added contextOrNull<T>() overload to BasicSerializer/BasicDeserializer. Difference between contextOrNull<T>() and context<T>() is, that using context<T>() code doesn't compile if T doesn't exists at all, while using contextOrNull<T>() code compiles, but returns nullptr at runtime.
    • โž• added inheritance support via extensions. In order to correctly manage virtual inheritance two extensions was created in **** header:
      • BaseClass<TBase> - use when inheriting from objects without virtual inheritance.
      • VirtualBaseClass<TBase> - ensures that only one copy of each virtual base class is serialized.

    To keep track of virtual base classes InheritanceContext is required, but it is optional if no virtual bases exists in serialization flow. I.e. if context is not defined, code will not compile only if virtual inheritance is used. See [inheritance](examples/inheritance.cpp) for usage example.

    ๐Ÿ‘Œ Improvements

    • added optional ctor parameter for PointerOwner and PointerObserver - PointerType, which specifies if pointer can be null or not. Default is Nullable.
  • v4.1.0 Changes

    October 27, 2017

    ๐Ÿ”‹ Features

    • โž• added raw pointers support via extensions. In order to correctly manage pointer ownership, three extensions was created in **** header:
      • PointerOwner - manages life time of the pointer, creates or destroys if required.
      • PointerObserver - doesn't own pointer so it doesn't create or destroy anything.
      • ReferencedByPointer - when non-owning pointer (PointerObserver) points to reference type, this extension marks this object as a valid target for PointerObserver.

    To validate and update pointers PointerLinkingContext have to be passed to serialization/deserialization. It ensures that all pointers are valid, that same pointer doesn't have multiple owners, and non-owning pointers doesn't point outside of scope (i.e. non owning pointers points to data that is serialized/deserialized), see [raw_pointers example](examples/raw_pointers.cpp) for usage example.

    Currently polimorphism and std::shared_ptr, std::unique_ptr is not supported.

    • added context<T>() overload to BasicSerializer/BasicDeserializer and now they became typesafe. For better extensions support, added posibility to have multiple types in context with std::tuple. E.g. when using multiple extensions, that requires specific contexts, together with your custom context, you can define your context as std::tuple<PointerLinkingContext, MyContext> and in serialization function you can correctly get your data via context<MyContext>().

    ๐Ÿ‘Œ Improvements

    • new OutputBufferedStreamAdapter use internal buffer instead of directly writing to stream, can get more than 2x performance increase.
      • can use any contiguous container as internal buffer.
      • when using fixed-size, stack allocated container (std::array), buffer size via constructor is ignored.
      • default internal buffer is std::array.
    • added static_assert when trying to use BufferAdapter with non contiguous container.
  • v4.0.1 Changes

    October 18, 2017

    ๐Ÿ‘Œ Improvements

    • ๐Ÿ‘Œ improved usage with Visual Studio:
      • improved CMake.
      • Visual Studio doesn't properly support expression SFINAE using std::void_t, so it was rewritten.
    • refactorings to remove compiler warnings when using -Wextra -Wno-missing-braces -Wpedantic -Weffc++
    • added assertion when session is empty (sessions is created via growable extension).
    • stream adapter manually setstate to std::ios_base::eofbit when unable to read required bytes.
  • v4.0.0 Changes

    October 13, 2017

    I feel that current library public API is complete, and should be stable for long time. ๐ŸŽ Most changes was made to improve performance or/and make library usage easier.

    ๐Ÿ”‹ Features

    • new flexible syntax similar to cereal library. This syntax no longer requires to specify explicit fundamental type sizes and container maxsize (container max size can be enforced by special function maxSize). Be careful when using deserializing untrusted data and make sure to enforce fundamental type sizes when using on multiple platforms. (use helper function assertFundamentalTypeSizes to enforce type sizes for multiple platforms)
    • added streaming support, by introducing new adapter concept. Two adapter implementations is available: stream adapter, or buffer adapter.
    • added missing std containers support: forward_list, deque, stack, queue, priority_queue, set, multiset, unordered_set, unordered_multiset.

    ๐Ÿ’ฅ Breaking changes

    • a lot of classes and files were renamed.
    • ๐Ÿ‘Œ improved error messages.
    • traits reworked:
      • ContainerTraits get isContiguous.
      • TextTraits is separate from ContainerTraits, only has length, and addNUL.
      • buffer traits renamed to BufferAdapterTraits and removed difference type.
      • added TValue to all trait types, this is used to diagnose better errors.
    • BasicBufferReader/Writer is split in two different types: AdapterReader/Writer and separate type that enables bit-packing operations AdapterBitPacking(Reader/Writer)Wrapper.
    • Serializer/Deserializer reworked
      • No longer copyable, because it stores adapter writer/reader.
      • Removed boolByte, boolBit, and added boolValue and it writes bit or byte, depeding on if bit-packing is enabled or not.
      • Bit-packing is enabled by calling enableBitPacking, if bitpacking is already enabled, this method will return same instance.
    • 0๏ธโƒฃ changed defaults for DefaultConfig, BufferSessionsEnabled is false by default, because it doesn't work with input streams.
    • serialization config no longer needs typedef Buffer.