Would be nice if only prefix operator++ required for iterators passed to deserialize #477
Replies: 4 comments
-
Also it requires array subscript operator on the iterator |
Beta Was this translation helpful? Give feedback.
-
@petebannister
You're right. There's no need to use postfix version and we should avoid depending on such a fragile expectation if possible. |
Beta Was this translation helpful? Give feedback.
-
@petebannister |
Beta Was this translation helpful? Give feedback.
-
Looks good! Thank you |
Beta Was this translation helpful? Give feedback.
-
Thank you for this excellent library.
Didn't really seem to be a bug.. but iterators passed to deserialize require postfix operator++ to be defined.
The iterator requirements could be slightly relaxed to only require prefix version.
Postfix version may be slightly less efficient (and also more error-prone to implement), depending upon the iterator object (though compiler may be clever enough to optimize).. See https://people.csail.mit.edu/addy/effective_c++/MEC/MI6_FR.HTM
Beta Was this translation helpful? Give feedback.
All reactions