Support "prototype" functions for trivial component types
JessyDL opened this issue · 1 comments
JessyDL commented
Due to the requirements of std::is_trivially_constructible
we cannot have constructors with side effects for serializable types. Add the ability to have a "prototype" function of some sort allowing the user to specify a "good default value" for a new instance.
This works as the only time new objects get created is either from a known position (from the type system's perspective), or from known data (deserialization and internal stack).