I think it's not possible without some extra work.
next_permutation() works with a sequence and corresponding iterator. With 2D array you should have some 2D iterator which works with rows of that array. When swapping two rows, function should be able to get whole row at once with dereferencing using * operator. That is not possible with 2D array and ordinary int pointer, i.e. it is, but it does not work what you expect.