Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Range][Boost.Iterators] - iterator as pointer
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2011-08-15 13:58:28


On Aug 15, 2011, at 1:44 PM, Christoph Heindl <christoph.heindl_at_[hidden]> wrote:

> On Mon, Aug 15, 2011 at 7:22 PM, Gordon Woodhull <gordon_at_[hidden]> wrote:
>>
>> If you still have the container type at the place where you're trying to deduce is_continuous, I think that would be the way to go.
>
> Unfortunately I don't have access to the container type, because my
> iterator comes from any boost.range compatible type.

Right. I don't think you can determine from its type if an iterator came from a vector. You could determine if the iterator is random access but then you'd be screwed if someone passed you a deque iterator, if you really need contiguity.

Maybe I'm missing something. I know you can't ever deduce T from dependent<T>::nested though.

Sorry,
Gordon



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