Instantiating stable_partition with an iterator where the difference_type is something different than ptrdiff_t results in an error like this: .../bits/stl_algo.h: In function `_ForwardIterator std::stable_partition(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = my_iterator, _Predicate = bool (*)(double)]': test.c:32: instantiated from here .../bits/stl_algo.h:2154: error: no matching function for call to `__stable_partition_adaptive(my_iterator&, my_iterator&, bool (*&)(double), short int, double*, ptrdiff_t)' The __stable_parition_adaptive effectively requires the __len and __buffer_size arguments to have the same type, and stable_parition calls it with one of them always as ptrdiff_t.
*** This bug has been marked as a duplicate of 31554 ***