Currently, readFrom is a member of eoSerial, thus it necessitate an existing instance to be called.
This makes constructors without parameter mandatory, and is error prone.
For instance, it allows some operators to create empty EOT instances (like when using resize) on the fly.
The fix would be to make readFrom free friend functions, in which one can instantiate with mandatory parameters, just like std::begin.
Currently,
readFrom
is a member of eoSerial, thus it necessitate an existing instance to be called. This makes constructors without parameter mandatory, and is error prone. For instance, it allows some operators to create empty EOT instances (like when usingresize
) on the fly.The fix would be to make readFrom free friend functions, in which one can instantiate with mandatory parameters, just like
std::begin
.