We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I copyed the sample code and just change the value of c to UINT64_MAX, the assert failed.
#include <alpaca/alpaca.h> int main() { struct MyStruct { char a; int b; uint64_t c; float d; bool e; }; MyStruct s{ 'a', 5, UINT64_MAX, 3.14f, true }; // Serialize std::vector<uint8_t> bytes; auto bytes_written = alpaca::serialize(s, bytes); // Deserialize std::error_code ec; auto recovered = alpaca::deserialize<MyStruct>(bytes, ec); assert((bool)ec == false); assert(recovered.a == 'a'); assert(recovered.b == 5); assert(recovered.c == UINT64_MAX); assert(recovered.d == 3.14f); assert(recovered.e == true); }
Is this a problem? My test environment is msvc2022. I also tested the same code in Ubuntu 20.04.4 LTS and g++ version 9.4.0 , same result.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I copyed the sample code and just change the value of c to UINT64_MAX, the assert failed.
Is this a problem? My test environment is msvc2022.
I also tested the same code in Ubuntu 20.04.4 LTS and g++ version 9.4.0 , same result.
The text was updated successfully, but these errors were encountered: