Rodrigo Dias Ferreira wrote:
Hi Joaquim,
I saw what you meant, and I have changed... But still if I use the same graph_h, still I got the same problem: Here it is my solution for the Graph constructor: Graph(const Graph &g) : _rangeBegin(g._rangeBegin), _rangeEnd(g._rangeEnd), _nodeRep(g._nodeRep), _nodeNameRep(g._nodeNameRep), _localPropRep(g._localPropRep), _globalPropRep(g._globalPropRep){ //_nodeRep::_uniqueName* Initialization pair
rangeNodeIt; nodeMapIt tmpNodeIt; rangeNodeIt.first = g._nodeRep.begin(); rangeNodeIt.second = g._nodeRep.end(); while (rangeNodeIt.first != rangeNodeIt.second){ _nodeRep.insert(nodeMap( &*(_nodeNameRep.find(rangeNodeIt.first->_uniqueName->_name)), rangeNodeIt.first->_timestamp, rangeNodeIt.first->_node)); ++rangeNodeIt.first; }
}
I'm still seeing a problem here: _noderep is populated twice: Graph(const Graph &g) : _rangeBegin(g._rangeBegin), _rangeEnd(g._rangeEnd), _nodeRep(g._nodeRep), // _nodeRep is populated here ...{ ... while (rangeNodeIt.first != rangeNodeIt.second){ _nodeRep.insert(...); // and here again } } Shouldn't you be omitting the first population? Besides, I recommend you turn on Boost.MultiIndex safe-mode on as commented on my previous post and see whether some assertion triggers. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -- View this message in context: http://www.nabble.com/Re%3A--multi_index--Problem-of-scope-with-the-replace-... Sent from the Boost - Users mailing list archive at Nabble.com.