All Versions
23
Latest Version
Avg Release Cycle
62 days
Latest Release
102 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v5.2.1
November 14, 2020๐ Improvements
Input/OutputBufferAdapter
now statically asserts that underlying type is 1byte in size.
๐ Bug fixes
- ๐ fixed serialization in
StdBitset
when it's size is less thenunsigned long long
.
-
v5.1.0
June 08, 2020๐ Features
- new extension StdAtomic (thanks for VelocityRa).
๐ Improvements
- ๐ [examples](examples) no longer include bitsery in global namespace (removed
using namespace bitsery
). - โ removed multiple warning regarding integer conversions (thanks to tower120).
- โ removed unnecessary
dynamic_cast
from BasicInput/OutputStreamAdapter (thanks to tower120). - ๐ fixed some include paths, now you can basically to copy/paste bitsery include directory to your project without cmake support.
Other notes
- โ added tutorial of how to write your own extension ([here])(doc/tutorial/first_extension.md).
- ๐ now gtest 1.10 is required if you want to build tests.
-
v5.0.3
January 29, 2020๐ Improvements
- rewritten buffer adapters (and
BasicBufferedOutputStreamAdapter
) to fix UB when incrementing past the end iterator, and added an additional read/write method that accepts a number of bytes to be read/written at compile time. This provides additional optimization opportunities.
- rewritten buffer adapters (and
-
v5.0.2
January 17, 2020๐ Bug fixes
- ๐ fixed a bug when deserializing non-default constructible containers (thanks to nicktrandafil).
- ๐ fixed issue with a brace initialization in extension StdMap and StdSet. It was working on major compilers, but it wasn't C++11 compatible.
More info about it in stackoverflow (thanks to BotellaA).
Other notes
- added [patches/centos7_gcc4.8.2.diff](patches/centos7_gcc4.8.2.diff) that allows to use bitsery with gcc4.8.2 on Centos7 (thanks to BotellaA). More information on patches is [here](patches/README.md).
- โ added documentation on how [extensions](doc/design/extensions.md) work.
-
v5.0.1
August 21, 2019๐ Bug fixes
- ๐ fixed polymorphic handler deleter in
PolymorphicContext
, now it is captured by value and doesn't depend on lifetime ofPolymorphicContext
instance. - ๐ fixed compilation errors in
ext/utils/pointer_utils.h
on macOS. - โฌ๏ธ reduced warnings on Visual Studio (thanks to BotellaA)
- ๐ fixed polymorphic handler deleter in
-
v5.0.0
July 09, 2019This version reduces library complexity by removing redundant features and changing existing ones. โ Additionally, it provides more customization options for serialization/deserialization flow.
๐ Features
- added config options to enable/disable checking input adapter and data errors: CheckAdapterErrors and CheckDataErrors. ๐ If you can trust your data this will improve deserialization performance. Error checks are enabled by default.
- all memory allocation in the library can be customized using memory resource (similar to c++ 17 memory resource)
- contexts that internally requires to allocate memory are: PointerLinkingContext, PolymorphicContext, and InheritanceContext.
- extensions, for pointers like types, that allocate memory are: PointerOwner and StdSharedPtr. More information about pointer extension can be found [here](doc/design/pointers.md).
๐ฅ Breaking changes
- improved design for serializer/deserializer context. It was hard to understand and easy to misuse, so several changes were made.
- removed internal context from config, because it doesn't actually solve any problems, only allows doing the same thing in multiple ways.
- removed
T* context()
. This allowed to get a context that isstd::tuple<...>
, but you can do the same with other methods, by wrapping in an outer tuple, e.g.std::tuple<std::tuple<...>>
. - if a context is defined, in serializer/deserializer, it is passed (and stored) by reference as a first argument (instead of pointer). Other parameters are forwarded to a input/output adapter.
- changed signature
T* context<T>
toT& context<T>
, this will either return context or doesn't compile, previously it could also return nullptr. context<T>
andcontextOrNull<T>
now also check if a type is convertible, so it can work with base classes (e.g. you can require a base class of context in extension, but provided child implementation instead). This allows to further customise extension by providing different context implementations.
- reworked BufferedSessions. It was the only feature that was in a bitsery core and required allocations. ๐ It was removed and instead was added ability to change read/write position directly for buffered adapters. This is also a more flexible solution, and can be used to implement solutions that allow deserialization in-place like flatbuffers does.
- ๐ changed the signature to all serialization functions that accept lambdas, instead of accepting
(T& )
, now accept(S& ,T& )
. This allows much easier serialization customization, because no additional state is required in a functor, and these methods can now accept function pointers or stateless lambdas. - โ removed various functions/classes that became redundant:
- AdapterWriter/Reader classes - their functionality is moved to adapters.
- AdapterAccess class - now serializer/deserializer expose adapter directly via
adapter()
method. Additionally adapter can be moved out if serializer/deserializer is rvalue .e.gauto adapter = std::move(ser).adapter();
. - removed Writer/Reader parameters from extensions serialize/deserialize methods - because serializer/deserializer now expose adapter directly.
- archive from serializer/deserializer - because
operator()
do the same thing, but it is more terse, and is compatible withcereal
library. - align function from serializer/deserializer - it can now be called directly on input/output adapter.
- UnsafeInputBufferAdapter - instead config option is provided to disable adapter read errors (CheckAdapterErrors).
- isValidState from stream output adapter - it didn't provide any additional information that couldn't be queried directly on stream object.
- registerBasesList from PolymorphicContext - it was previously deprecated.
- ๐ renamed various classes/functions and files:
- flexible to brief_syntax - this is a big change and might affect a lot of code, but it was necessary, because this name was contradicting to what it actually was trying to achieve.
Migration should not be very hard, just global replace
flexible
tobrief_syntax
and it should work:). - BasicSerializer/BasicDeserializer to Serializer/Deserializer - previously they were aliases, but after removing adapter writer/reader,
serializer/deserializer signature has changed to
Serializer/Deserializer<Adapter, Context=void>
and no longer need any alias. - setError to error for input adapters.
- NetworkEndianness to Endianness in config.
- MeasureSize adapter moved to separate file
/adapter/measure_size.h
- flexible to brief_syntax - this is a big change and might affect a lot of code, but it was necessary, because this name was contradicting to what it actually was trying to achieve.
Migration should not be very hard, just global replace
๐ Improvements
- โ added
quickSerialization/Deserialization
overloads that can accept context as first parameter. - added convenience classes (functors) FtorExtValue, FtorExtObject, in places where you need to provide (des)serialize function/lambda that uses extension.
e.g. instead of writing
s.container(obj, [](S& s, MyData& data) {s.ext(data, MyExtension{});});
you can writes.container(obj, FtorExtObject<MyExtension>{});
- โ added more tests for adapters.
- ๐ input adapters now save first error that occured, this allows better diagnostic for what actually happened.
๐ Bug fixes
- ๐ fixed
enabledBitPacking
in serializer/deserializer where writer/reader and internal context states were not restored properly after bit packing is complete.
-
v4.6.0
March 12, 2019๐ Features
- new extensions StdTuple and StdVariant for
std::tuple
andstd::variant
. These are the first extensions that requires C++17, or higher, standard enabled. Althoughstd::tuple
is C++11 type, but from usage perspective it has exactly the same requirements asstd::variant
and relies heavily on having class template argument deduction guides to make it convenient to use. You can easily usestd::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 arounds.ext<N>(o, Ext{})
and OverloadExtObject wrapper arounds.ext(o, Ext{})
.
- instead of providing custom lambda to overload each type in tuple or variant, there was added several helper callable objects.
OverloadValue wrapper around
- new extensions StdDuration and StdTimePoint for
std::chrono::duration
andstd::chrono::time_point
.
๐ Improvements
tests now uses
gtest_discover_tests
function, to automatically discover tests, which requires CMake 3.10. - new extensions StdTuple and StdVariant for
-
v4.5.1
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
toclass
where class is used as friend. e.g.friend class bitsery::Access
, because it is more conventional usage.