Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-03-31 10:41:02


JD wrote:
> Hello,
>
> Anyone has an idea why this code crashes:

> while (it++ != l.end())

You probably want

    for( ; it != l.end(); ++it )

here, since in the original the increment happens before the loop body.


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