[iterator.cust] (original) (raw)

(void)iter_swap(E1, E2), if eitherE1 or E2 has class or enumeration type anditer_swap(E1, E2) is a well-formed expression with overload resolution performed in a context that includes the declarationtemplate<class I1, class I2> void iter_swap(I1, I2) = delete;and does not include a declaration of ranges​::​iter_swap.

If the function selected by overload resolution does not exchange the values denoted by E1 and E2, the program is ill-formed, no diagnostic required.

[Note 1:

This precludes calling unconstrained std​::​iter_swap.

When the deleted overload is viable, program-defined overloads need to be more specialized ([temp.func.order]) to be selected.

— _end note_]