c ++ – Merge C ++ 11 C ++ sorting 17

Question

Anyway, can I further optimize that by using the new C ++ 11 or C ++ 17 features? Also want comments on variable naming, memory management and style (notice my placement of variable_name ++ in some areas), and how I summed up the genre in a recursive_merge_sort function and a merge a function.

Code

#understand 

merge void (int * data, low int, int mid, int high)
{
int low_copy = low;
int mid_copy = mid;

int size = up - down;
int * sorted = new int[size];
int i = 0;

while (low_copy <mid && mid_copy <high) {
if (data[low_copy] <data[mid_copy]) {
sorted[i] = data[low_copy++];
}
other {
sorted[i] = data[mid_copy++];
}
++ i;
}

while (low_copy <mid) {
sorted[i++] = data[low_copy++];
}
while (mid_copy <high) {
sorted[i++] = data[mid_copy++];
}

for (i = 0; i < size; ++i) {
        data[low + i] = sorted[i];
    }
}

void recursive_merge_sort(int* data, int low, int high) {
    if(low >= high - 1) {return; }

int middle = (up + down) / 2;
recursive_merge_sort (data, low, mid);
recursive_merge_sort (data, mid, high);

merge (data, low, medium, high);
}

void merge_sort (int * data, int num_elements) {
recursive_merge_sort (data, 0, num_elements);
}

int main ()
{
int data[] = {5, 1, 4, 3, 65, 6, 128, 9, 0};
int num_elements = 9;

std :: cout << "unsorted  n";
for (int i = 0; i <num_elements; ++ i) {
std :: cost << data[i] << "";
}

merge_sort (data, num_elements);

std :: cout << " nsorted  n";
for (int i = 0; i <num_elements; ++ i) {
std :: cost << data[i] << "";
}

returns 0;
}