Generic merge sort in C++ using a user-defined comparison function or the < operator by default
Avoid a copy by passing by const reference.

[](RandomAccessIterator::value_type const&amp; a, RandomAccessIterator::value_type const&amp; b) { return a &lt; b; }
                                    ^^^^^^                                     ^^^^^^


Don't need an if statatement here:

if (itUpper == last)
    std::copy(itLower, first + m, itResult);
else
    std::copy(itUpper, last, itResult);


One of these ranges will be empty and just do nothing.

std::copy(itLower, first + m, itResult);
std::copy(itUpper, last, itResult);


To avoid a copy (which can be expensive on non POD types). Prefer to use move.

std::move(itLower, first + m, itResult);
std::move(itUpper, last, itResult);

std::move(v.begin(), v.end(), first);


You spend a lot of time creating the temporary array:

std::vector&lt;RandomAccessIterator::value_type&gt; v(last - first);


Basically this causes calls to new for every call to void mergesort(RandomAccessIterator first, RandomAccessIterator last, Compare comp). You can optimize this by allocating the temp space once in void mergesort(RandomAccessIterator first, RandomAccessIterator last) and pass the section of the temp array that recursive function can use. 

I know you are trying to be explicit with RandomAccessIterator. But it is more traditional to use single letter for template types. Also there is no compiler validation that your iterator is random accesses (so you are giving a false sense of security to your user).

C++20 should add Concepts (finally). Single letter template types will work well with this.

 template&lt;typename I&gt;
 requires RandomAccessIterator&lt;I&gt;
 void mergesort(I begin, I end){}


For C++ pre 20 You can write:

 template&lt;typename I&gt;
 // requires RandomAccessIterator&lt;I&gt;
 void mergesort(I begin, I end){}


Which provides the same information and when concepts are added you can just remove the comment.