On Sat, Mar 16, 2013 at 7:42 AM, Stefan Strasser <strasser@uni-bremen.de> 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