Boost logo

Boost Users :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-10-02 02:12:53


Jeffrey Holle ha escrito:
[...]

> This solved my compilation problem, but I ended up with an app than
> wants to runs forever.

[...]

> p.getXYIndex().modify(p.getXYIndex().find(make_tuple(y,x1)),
> &ll::_1->*&Positioner::entry::m_x=UINT_MAX);
> //p.getXYIndex().modify(p.getXYIndex().find(make_tuple(y,x2)),
> &ll::_1->*&Positioner::entry::m_x=x1);
> p.getXYIndex().modify(p.getXYIndex().find(make_tuple(y,UINT_MAX)),
> &ll::_1->*&Positioner::entry::m_x=x2);
> }
> }
>
> If I uncomment the middle line of the sort attempt, the application runs
> forever.
>
> Do you know what is wrong?

Most likely, you're calling modify() on a end iterator; check this in your code.
Also, remember this kind of errors can be detected by using B.MI safe mode:

http://boost.org/libs/multi_index/doc/tutorial/debug.html#safe_mode

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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