A Torsten T. Will tutorial in C ++ 11 says that since C ++ 11, it std::swapwill use the carrier swapfound by ADL if such a function without a member is defined, thus the pattern
using std::swap;
swap (obj1, obj2);
can always be replaced by simple
std::swap (obj1, obj2);
Unfortunately, I have not found such a statement anywhere.
What is the truth?
Johnb source
share