removed
Last edited on
// Can't use *swap* because it's part of the STL
grumble grumble that's exactly why you don't put using namespace std;
all over the place. swap doesn't normally conflict with std::swap.
(I'm not grumbling at you, I'm grumbling at your teacher)
Anyway, you are way overcomplicating this. The goal here is to write your own swap function, right? So just swap 'a' and 'b'. It's very simple.
asserting and min/max calls don't have anything to do with it. Just swap the values.
Also, the public
keyword has no place in a function.