Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_FOREACH infinite loop issue
From: Neil Groves (neil_at_[hidden])
Date: 2010-06-10 17:30:28


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 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