Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2012-11-16 14:12:30


On Fri, Nov 16, 2012 at 11:59 AM, Yanchenko Maxim

> 17.11.2012, 02:47, "Peter Dimov" <lists_at_[hidden]>:
> > 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.
> The std library implementations I've looked into (VC++ & libc++) already
specialize things like fill & copy for POD pointer types. Such a proposal
would improve the speed of applying such algorithms to T* wrapping
iterators, where those iterators don't store anything but T* on the stack.
(They might have a static variable which they use for iterator invalidation
checking -- I recall something like that was discussed for libc++.)

In any case, the utility of such a trait seems limited, but existent.


Boost list run by bdawes at, gregod at, cpdaniel at, john at