There has been numerous questions asked about how to sort multiple arrays in C++ at once. Answers are always the same, i.e., to use the vector of structs instead of multiple arrays. Unfortunately, I cannot do this for several reasons (I/O, partial MPI transfers, utilization of vectorization units, etc.). Also, I cannot translate the array of structs into independent arrays after sorting due to memory limitations. My question is, if there exists any C++ implementation of some efficient (n log n) sorting algorithm that can work with custom swap (and custom compare) operation?
(I still cannot understand why such an option is missing in the STL. Evidently, a lot of C++ programmers are asking for it.)