Boost logo

Boost Users :

Subject: [Boost-users] [range] contiguous iterators
From: Stefan Strasser (strasser_at_[hidden])
Date: 2013-03-16 10:42:51


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

?


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