3 ms·
That's why you need an extensible serialization system: to handle data that isn't copyable or whose copies would require memory allocation.
by mgaunard 3y ago
That's why you need an extensible serialization system: to handle data that isn't copyable or whose copies would require memory allocation.
- linkdd 3y agoWhich my library propose with the very simple concept `as_string_trait` that requires the presence of a method `std::string as_string() const`. It's good enough for 100% of my use cases.
- mgaunard 3y agowell clearly that doesn't work, you can't pass it a buffer to write into. This necessary allocates, and I guess it formats on the hot path too.
- linkdd 3y agoWhich is good for 100% of my use cases, since I don't deal with real time systems, or performance intensive applications, or memory/allocation constrained environments. No need to use the bazooka to kill an ant.