
27 May
2010
27 May
'10
1:30 a.m.
Hey Stephan,
Of course you can.
I know that's what I said but it's not what I meant :) My point was about the fact that if you have two functions with the following signatures template<typename T> void swap(T & t); template<typename T> T swap(const T & t); when the user has this int i; then there is no way to specify whether or not he wants the copying or the swap-in-place version (ok, I can think of a way but I think it's way too convoluted) swap(i); //what does this mean? I was just trying to explain why I chose to have a swap_in_place<>() rather than rely on overloading. Sorry for any confusion.