Boost logo

Boost :

Subject: Re: [boost] [iterator] Help needed understanding output_iterator requirements
From: Thomas Witt (witt_at_[hidden])
Date: 2010-05-02 15:25:53


I neither have access to VC 10 nor to the sources right now, but looking at the messages Boost.MultiArray simply uses iterator_facade incorrectly. The problem is not in Jeremy's patch it is in MultiArray not making sure that the facade based iterator supports output.



On May 1, 2010, at 5:50 PM, Thomas Klimpel wrote:

> Dear authors of Boost.Iterator,
> As described in <>, Boost.MultiArray is currently unusable with the recently released MSVC 10. This is also confirmed by many failures in the regression tests: <>.
> These failures are caused by a specific behavior of iterator_facade from Boost.Iterator, introduced by Jeremy Siek with the explanation "changed iterator_facade_default_category to stop lying about output_iterator_tag": <>.
> I'm not the right person to judge (or understand) how serious the original code was a lying, but the attached patch that conditionally reintroduces the original behavior as a workaround for MSVC 10 fixes all compile failures of the regression tests of Boost.MultiArray for me (MSVC 10 does compile time checking of iterator categories when _HAS_ITERATOR_DEBUGGING is defined). However, the "resize" regression test then fails with a runtime error (assertion failure) instead of a compile error:
> testing.capture-output ..\..\..\bin.v2\libs\multi_array\test\resize.test\msvc-10.0\debug\threading-multi\
> ====== BEGIN OUTPUT ======
> Assertion failed: index_bases[n] <= start && start < index_bases[n]+index(extents[n]), file C:\nobackup\boost_trunk\boost/multi_array/base.hpp, line 446
> C:\nobackup\boost_trunk\boost/test/minimal.hpp(123): exception "R6010
> - abort() has been called
> " caught in function: 'int __cdecl main(int,char *[])'
> **** Testing aborted.
> **** 1 error detected
> ====== END OUTPUT ======
> I have no idea whether this failure is related to the reintroduced lying or not. All I know is that there have been recent request to find "some kind of proper workaround or fix" for these issues: <>. But from my point of view, the only responsibility I may have with respect to these issues is to notify the authors of the affected libraries, which I have done now.
> Regards,
> Thomas
> <facade_iterator_category.patch>

Thomas Witt
Zephyr Associates, Inc. 

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