Quicksort implementation in C++
There is just one thing wrong with your code.
Don't ever call std::swap using a qualified name. Doing so cuts out user-defined functions which might be better, or actually viable. Use using std::swap; swap(*pa, *pb); or maybe std::iter_swap(pa, pb);.
Next, there's on thing sub-optimal. You are passing the range, as well as start and end. Knowing where in the overall range the part you are currently processing is does not help, so you can eliminate an argument.
Work on genericity by following C++ conventions.
Useing half-open iterator-ranges allows wider application, you only need mutable forward-iterators.
Finally, Don't use &lt;= for comparing the elements. All the standard algorithms only use &lt;, and there's no compelling reason to break with that convention.




template &lt;class ForwardIter&gt;
void quicksort(const ForwardIter begin, const ForwardIter end) {
    if (begin == end) return;
    auto cur = begin;
    if (++cur == end) return;
    auto mid = begin;
    for (; cur != end; ++cur)
        if (*cur &lt; *begin)
            std::iter_swap(cur, ++mid);
    std::iter_swap(begin, mid);
    quicksort(begin, mid);
    quicksort(++mid, end);
}