What is the copy-and-swap idiom? in this question, in the top answer, within the section where the swap public friend overload is implemented, the implementation makes use of this:
friend void swap(dumb_array& first, dumb_array& second){
//the line of code below
using std::swap;
//then it calls the std::swap function on data members of the dumb_array`s
}
My question is the following: what is the using std::swap
used for here (the answer mentions something related to enabling ADL); what use case of "using" is specifically being invoked here and what are the effects of adding that line of code and the effects of not adding it on the code?