Earlier quoted context omitted.
What do you mean? Sorting is done by swapping elements ( swap(a[i], a[j]) )
Well, first, whether swap() is used or not depends on the algorithm; second, the result of the sorting, as opposed to reversal, does not necessary look like the elements were swapped.
I didn't mean the std::swap() function itself, but the swapping of two elements a[i] and a[j]. Is there any sorting algorithm that doesn't rely on swapping two elements (or two parts of the array)? I guess, only if the sort is not being done in-place and the result is stored in a different variable/memory.
> does not necessary look like the elements were swapped
The only way elements don't look like they are swapped is elements are changed, added or removed, which doesn't happen during sort.