Hello Vincent,
Normally you would have to program this yourself. E.g. you can generate a vector of increasing integers (vertex indices), write a custom comparison function that compares v1 and v2 through degrees[v1] and degrees[v2], then use this to sort the indices (e.g. through the qsort() C standard library function, or much more easily with std::sort() in C++)
Luckily, this is already done in igraph, though not documented. The function is igraph_vector_qsort_ind() You'll find its description in the vector.pmt file.