STL implementation doesn't sort keys
Closed this issue · 2 comments
In scanning the implementations for issue 6, it appears to me at first glance that the STL implementation doesn't sort the key array, and as such is an invalid implementation.
This either needs to be fixed, or the implementation removed from distribution.
I realise this is an old issue. I’m about to try and use the C++ STL implementation.
Just looking at the code, it seems ok, if this is what you’re referring to: https://github.com/bdrister/AquaticPrime/blob/master/Source/STL/AquaticPrime.cpp#L172
C++ std::map is internally implemented as a tree that when iterated over will be sorted by key.
I'm not sure what I was referring to back then, but I agree, looking at it now it looks OK. (Besides all of the debugging crap in that file…yeesh…looks like I didn't look at a pull request closely enough.)