Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-10-29 04:38:41


Ilya Shvetsov ha escrito:

> Hi All!
> This program demostrate the problem
> <code>
> #include <boost/multi_container_index.hpp>
> #include <boost/multi_index/ordered_index.hpp>
>
> int main(int argc, char* argv[]
> typedef boost::multi_index::multi_index_container<int> int_set;
> int_set s;
> int_set::iterator itr = s.begin();
> ++itr;
> return 0;
> }
>
> </code>
>
> Program hangs up in increment if s is empty. I undestand that this is my
> problem. But may be "assert" can be inserted for such cases
>

Hi Ilya

You can enable the so-called safe mode by inserting this

#define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE

prior to the inclusion of Boost.MultiIndex headers. With this
mode switched on, this problem (and many others) gets asserted.
More info about safe mode in

http://boost-consulting.com/boost/libs/multi_index/doc/advanced_topics.html#safe_mode

HTH

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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk