
16 Nov
2012
16 Nov
'12
7:08 p.m.
On Fri, Nov 16, 2012 at 8:59 PM, Yanchenko Maxim <maximyanchenko@yandex.ru>wrote:
17.11.2012, 02:47, "Peter Dimov" <lists@pdimov.com>:
Yakov Galka wrote:
I would attack this problem in a different way. There should be a contiguous_iterator_tag : random_access_iterator_tag in the standard, ... This deserves a standard proposal, IMO.
Isn't just an std::is_pointer<> enough to make a choice? iterator_range<T*> is already a contiguous range as T* is a contiguous iterator.
For the pointers case, not for capturing the fact that std::string::iterator and std::vector::iterator are also guaranteed to be contiguous. Contiguous means something like &i[n] == &*i + n. -- Yakov