Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] contiguous iterators
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2013-03-18 11:06:03


On Sat, Mar 16, 2013 at 7:42 AM, Stefan Strasser <strasser_at_[hidden]>wrote:

> Hi everyone,
>
> is there any way to generically determine at compiletime whether an
> iterator or a boost range refers to contiguous memory?
>
> i.e. &*(it+1) == (&*it)+1
>
> some type trait like
>
> is_contiguous<T *>::value == true
> is_contiguous<vector<T>::**iterator>::value == true
> is_contiguous<std::list<T>::**iterator>::value == false
>
> ?
>

AFAIK, not presently, but this has been discussed quite a bit in several
past threads on the Boost developers list.

- Jeff



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net