mirror of
https://github.com/fraillt/bitsery.git
synced 2026-08-20 10:10:01 +00:00
simplified usage by merging adapter writer/reader with input/output
adapter and ability to disable checks on deserialization
This commit is contained in:
committed by
Mindaugas Vinkelis
parent
1822796f2e
commit
105aa5f9e5
@@ -66,11 +66,11 @@ TEST(SerializeExtensionStdSet, FunctionSyntax) {
|
||||
SerializationContext ctx1;
|
||||
std::unordered_multiset<int32_t> t1{54,-484,841,79};
|
||||
std::unordered_multiset<int32_t> r1{74,878,15,16,-7,5,-4,8,7};
|
||||
auto ser = ctx1.createSerializer();
|
||||
auto& ser = ctx1.createSerializer();
|
||||
ser.ext(t1, StdSet{10}, [](decltype(ser)& ser, int32_t& v) {
|
||||
ser.value4b(v);
|
||||
});
|
||||
auto des = ctx1.createDeserializer();
|
||||
auto& des = ctx1.createDeserializer();
|
||||
des.ext(r1, StdSet{10}, [](decltype(des)& des, int32_t& v) {
|
||||
des.value4b(v);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user