cpp-drop-merge-sort
cpp-drop-merge-sort copied to clipboard
Make dmsort work with bidirectional iterators
trafficstars
As mentioned in #2 years ago, drop-merge sort lends itself well to working with bidirectional iterators. This PR merely tweaks it to avoid operations that only work with random-access iterators, and adds a corresponding test.
I've shipped this bidirectional version in my own library for years without a problem.