Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-09-23 04:31:31

"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message
Joaquín Mª López Muñoz writes:
> Aleksey Gurtovoy ha escrito:

> I think the patch is correctly applied. When I submitted it, I reported
> that the tests list_inserter, list_of and multi_index_container would still
> crash at run-time,

Oh, I missed this somehow.

> which is what's happening (more or less):
> * test_list_inserter: behaving as predicted
> * list_of: behaving as predicted (in fact, this test does not depend on the
> patch at all, list_inserter.hpp is not included)
> * multi_index_container: here we have differing results; in my local
> environment, there's no hang up, but a sure crash.

OK. Thorsten, could you tell us what's up with the crashes?

The first is solved by non executing this long-haired code

    typedef vector<int> score_type;
    typedef map<string,score_type> team_score_map;
    typedef std::pair<string,score_type> score_pair;
    team_score_map team_score;
    insert( team_score )( "Team Foo", list_of(1)(1)(0) )
                        ( "Team Bar", list_of(0)(0)(0) )
                        ( "Team FooBar", list_of(0)(0)(1) );
    BOOST_CHECK_EQUAL( team_score.size(), 3u );
    BOOST_CHECK_EQUAL( team_score[ "Team Foo" ][1], 1 );
    BOOST_CHECK_EQUAL( team_score[ "Team Bar" ][0], 0 );

for msvc.

the second is simply that conversion operators don't work properly leading to
the crash...I don't
know exactly why, but applying ()()()().to_container( c ) to all lists fixed
the crash.

both have been comitted



Boost list run by bdawes at, gregod at, cpdaniel at, john at