Opened 11 years ago
Last modified 10 years ago
#6240 new Feature Requests
iterator_size
Reported by: | Owned by: | jeffrey.hellrung | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iterator |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: | jeffrey.hellrung |
Description
Could you add iterator_size to boost/iterator/iterator_traits.hpp?
It'd be size_t for pointers and, since std::iterator_traits does not yet define size_type, make_unsigned iterator_difference.
It'd be used for the size of a range as given by a valid pair of iterators.
Change History (8)
comment:1 by , 10 years ago
comment:3 by , 10 years ago
Cc: | added |
---|
comment:4 by , 10 years ago
IMO, it's more accurately a range trait. I don't see a context in which you'd speak of an "iterator's size type" outside of a range.
comment:5 by , 10 years ago
True, but the same applies to difference_type.
I don't really mind where this gets implemented though.
comment:6 by , 10 years ago
It looks like it's already implemented via boost/range/size_type.hpp, no? Would you be okay with closing this ticket?
comment:8 by , 10 years ago
Owner: | changed from | to
---|
This seems to be more appropriately placed within the Range library than the Iterator library, doesn't it?