It would be better to use `serializedSize(*range.begin())` here (if the size is greater than zero).