As mentioned in the comments std::partial_sort_copy does not modify the size of the container that it writes to. So if the original size of the vector is 0, the size will not change. Therefore, nothing will get placed in the vector.
std::partial_sort_copy