Skip to content

Instantly share code, notes, and snippets.

@ceth-x86
Created October 12, 2020 10:55
Show Gist options
  • Save ceth-x86/7a9a4d149ac1c32a3051716d99541186 to your computer and use it in GitHub Desktop.
Save ceth-x86/7a9a4d149ac1c32a3051716d99541186 to your computer and use it in GitHub Desktop.
class obj {
int v;
public:
obj(int value) : v(value) { }
void swap(obj& other) {
using swap;
swap(this->w, other.v);
}
};
void swap(obj& a, obj& b) {
a.swap(b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment