Boost logo

Boost :

Subject: Re: [boost] [repost][multiarray] Bug with boost::detail::multi_array::array_iterator on MSVC 2010RC?
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2010-04-26 11:29:28


Christopher Lux wrote:
> i have run into the exact same problem when the copy constructor of a
> multi_array is called.
>
> Is there a fix to get this working without the macros above? It is
> sadly no option to compile all dependencies from scratch.

If you put the question like this, the other "workaround" I proposed in order to explain what goes wrong should work for you:

Thomas Klimpel wrote:
> But of course, you want to know whether this is a bug in
> boost::multi_array or a bug in MSVC 2010beta2. Before we come to that,
> another "workaround" would be to change multi_array/iterator.hpp:56 for
> , boost::random_access_traversal_tag
> to
> , std::random_access_iterator_tag
>
> This will most probably work, but would lying to the standard library,
> because the reference reference type of the corresponding iterator is
> not value_type& (but a proxy):
>
> http://lists.boost.org/boost-users/2006/11/23565.php

Of course, it would be best to fix it in Boost.Iterator, but this might be tricky as there seems to be some reason why the authors of Boost.Iterator initially (2003...) gave up on this problem.

Regards,
Thomas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk