Maybe we should add some assertion to check if we use this class correctly. It should never be used with types T of which instances can have different serialized size. Maybe is there some easy way to check it using static_assert?