We are using a multimap for quick value/index lookups, declared like this
typedef double Numerical;
std::multimap<Numerical, Int32> SortableRowIndex;
And we fill it up with pairs, using
SortableRowIndex.insert(std::pair<Numerical, Int32>(GetSortable(i), i));
The function GetSortable() always returns a double. And this works fine. Iterating through the values works fine too. But then comes the weird part... sometimes when we try to clear the data...
SortableRowIndex.clear();
... it goes into some kind of loop and stalls/races, hogging the used core of the CPU at 100%.
The clear method seems to be inherited from xtree (system file) and there are only a coupld of rows inside it:
void clear() _NOEXCEPT
{ // erase all
#if _ITERATOR_DEBUG_LEVEL == 2
this->_Orphan_ptr(*this, 0);
#endif /* _ITERATOR_DEBUG_LEVEL == 2 */
_Erase(_Root());
_Root() = this->_Myhead;
_Lmost() = this->_Myhead;
_Rmost() = this->_Myhead;
this->_Mysize = 0;
}
For some reason, my Visual Studio 2013 won't let me step into this method when debugging... and I can't, for the life of me figure out what the problem is!
Any help will be ridiculously appreciated!