|
Boost Users : |
Subject: Re: [Boost-users] BOOST_FOREACH infinite loop issue
From: yabcok (yabcok_at_[hidden])
Date: 2010-06-11 11:17:16
I'm afraid you are wrong. Subsequent handle values would be 0, 1,
INVALID_ELEMENT_HANDLE.
Please, compare this program behavior in release and debug builds, to
see the real problem (infinite lopp at the last BOOST_FOREACH).
Regards,
Jacek
On Thu, Jun 10, 2010 at 11:30 PM, Neil Groves <neil_at_[hidden]> wrote:
>
> On Thu, Jun 10, 2010 at 9:02 PM, yabcok <yabcok_at_[hidden]> wrote:
>>
>> I simplified the code even more. Get it here:
>> http://yabcok.nazwa.pl/ugly3.zip
>> In release build (VC2008 SP1) there's an infinite BOOST_FOREACH loop,
>> debug builds and other compilers (gcc, vc10) are OK.
>>
>> My skills are insufficient to root cause this problem.
>> Could anyone help me out?
>>
>
> Your iterator increment function in vector_elements_list.h is broken.
>
> In the case you attached the iterator starts with a handle of zero. The
> first increment will cause handle to be incremented to one. Subsequent
> increment operations have no effect.
>
>>
>> Regards,
>> Jacek
>>
>
> Regards,
> Neil Groves
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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