mirror of
https://github.com/fraillt/bitsery.git
synced 2026-08-24 03:58:31 +00:00
When deserializing into an `std::variant<Ts...>` and the object we're deserializing into already holds the requested variant, then we should try to deserialize into the existing object instead of recreating it if the variant is a nontrivial type. This is important when the object has a default constructor that performs a nontrivial amount of work, or when the object contains heap data that would need to be reallocated when recreating the object.