felixguendling / cista

Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.
https://cista.rocks
MIT License
1.78k stars 113 forks source link

fix optional #174

Closed julianharbarth closed 1 year ago

julianharbarth commented 1 year ago

fixes two bugs with cista::optional when wrapping types with non-trivial copy/move operations (e.g. offset::ptr).

  1. call copy/move constructors/assignment operators explicitly for types with non-trivial copy/move operations.
  2. use the serialization overload for the wrapped typed instead of the generic optional storage