I'm experiencing a "sequence not ordered" error when this code is executed and I'm not sure why. Any help would be appreciated, thanks.

void merge_sort(vector<int>& v, int from, int to, vector<int>& a){
	 if(from == to) return;
	 int mid = (from + to) / 2;
	 merge_sort(v, from, mid, a);
	 merge_sort(v, mid + 1, to, a);
	 merge(v.begin(), v.begin() + mid, v.begin() + mid, v.begin() + to, a.begin());