>  If it takes it by reference, this instantiation will fail if auto ref resolves to non-ref.

Oh, gah, not it won't! It'll get a copy. I see what you mean now. `swap` here needs to accept either `ref`, or a qualifier that is not passable to a `ref` function. Would `ref` and `in` overloads work?