Boost logo

Boost :

Subject: Re: [boost] [gil] Is bit_aligned_pixel_iterator a standard conformant random access iterator?
From: David Abrahams (dave_at_[hidden])
Date: 2010-05-31 08:33:15

At Sun, 30 May 2010 16:27:29 -1000,
Christian Henning wrote:
> Hi there, I'm having an interesting discussion over at the MSDN forums
> regarding compiler errors with MSVC10 that show up when using standard
> algorithms and bit_aligned images. Basically the question is why
> MSVC10 doesn't understand that bit_aligned_pixel_iterator is a random
> access iterator. For some reasons it thinks it's an input iterator and
> though std::copy, in this case, cannot find the correct copy
> implementation.
> One of the folks over at MSDN thinks that bit_aligned_pixel_iterator
> isn't implemented correctly with the interator_facade. He/She also
> thinks that iterator isn't fully standard compliant since it doesn't
> give a real reference but a proxy object instead when deferencing. I'm
> not sure if that's correct. Anyone knows if that's true or not.

It is indeed correct that ForwardIterator (and thus
RandomAccessIterator) forbids the use of proxy references. That
restriction is supposed to be dropped in C++0x.

Dave Abrahams           Meet me at BoostCon:
BoostPro Computing

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