nojhan/paradiseo

readFrom should be a free function to allow for EOT with constructors without arguments

nojhan opened this issue · 0 comments

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.