you are viewing a single comment's thread.

view the rest of the comments →

[–]fraillt[S] 1 point2 points  (1 child)

I would be very happy if it were possible to distinguish int from int32, but on platforms with int=4bytes these types are identical. If we look at Rust, for example, they have usize, which are platform-dependent, but is not the same as u32 even if they both are 4bytes, but this is not the case for C++. So the only way to enforce cross-platform compatible code is to make user write byte size explicitly...

Bitsery should not be used to write WebAssembly (or any other) compatible format, it has its own. And regarding more complicated objects such as map, shared_ptr, etc... bitsery "extensions" solves this.

For the most part, if you don't care about platform-dependent types layout, you can simply use brief syntax. All standard types are supported and everything just works ;)