Iterator based version of quicksort, allowing user defined pivot-selection-strategy
One thing that is missing is selecting a custom comparison function. This is usually done by adding a std::less like type to the template and passing that on to the partition

template&lt;typename It, typename Compare&gt;
It Partition(It begin,It end,It pivot, Compare comp)
{
    std::swap(*begin, *pivot); 
    pivot = begin;  
    It i{ begin }, j = std::next(begin, 1);
    for(;j != end; j++)
    {
        if(comp(*j, *pivot))
            std::swap(*j, *++i);
    }
    std::swap(*pivot, *i);
    return i;
}