The source code is quite self-explaining.
The code is properly working if the fixed-length econding is enable.
Linux - GCC v 14.1.1 - Current master branch.
Really scaring.
#include "alpaca/alpaca.h"
struct Simple {
uint32_t field {0};
};
int main() {
Simple data {0x12345678};
std::vector<uint8_t> bytes;
auto size = alpaca::serialize(data, bytes);
std::error_code err;
auto reconstructed = alpaca::deserialize<Simple>(bytes, err);
assert(!err);
assert(reconstructed.field == data.field); // And here it dies.
}
The source code is quite self-explaining.
The code is properly working if the fixed-length econding is enable.
Linux - GCC v 14.1.1 - Current
masterbranch.Really scaring.