Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class K {
- public:
- K() { }
- K& operator=(const K&) { printf("copy assigment\n"); return *this; }
- K& operator=(K&&) { printf("move assignment\n"); return *this; }
- };
- inline void fun(const K& k) {
- K p;
- p = k;
- }
- inline void fun(K&& k) {
- K p;
- p = k;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement