
14 May
2008
14 May
'08
4:17 a.m.
AMDG Julie Larson wrote:
Hello,
I'm using boost 1.35.0 and found this sample code about the hash set functionality:
http://www.boost.org/doc/libs/1_35_0/doc/html/intrusive/advanced_lookups_ins...
and modified it as shown below. I find that when iterating through the hash table, the thing crashes here (where the get_next function contains an invalid value for n):
<snip> ~CWordHash() { BOOST_FOREACH( CWord& w, m_hWords ) { CWord* pWord = &w; delete pWord;
I think this delete invalidates the iterator maintained by BOOST_FOREACH. In Christ, Steven Watanabe