#include <iostream>
class myclass{
public:
myclass(const myclass &other){std::cout << "copy\n";}
myclass(myclass &&other){std::cout << "move\n";}
template<typename Special>
myclass(Special &&arg){std::cout << "special\n";}
};
int main() {
const myclass c1(42); // special: int
myclass c2(c1); // copy
myclass c3(c2); // special: myclass& (non const)
myclass c4(std::move(c3)); // move
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgbXljbGFzc3sKcHVibGljOgogICAgbXljbGFzcyhjb25zdCBteWNsYXNzICZvdGhlcil7c3RkOjpjb3V0IDw8ICJjb3B5XG4iO30KICAgIG15Y2xhc3MobXljbGFzcyAmJm90aGVyKXtzdGQ6OmNvdXQgPDwgIm1vdmVcbiI7fQoKICAgIHRlbXBsYXRlPHR5cGVuYW1lIFNwZWNpYWw+CiAgICBteWNsYXNzKFNwZWNpYWwgJiZhcmcpe3N0ZDo6Y291dCA8PCAic3BlY2lhbFxuIjt9Cn07CgppbnQgbWFpbigpIHsKICAgIGNvbnN0IG15Y2xhc3MgYzEoNDIpOyAgICAgIC8vIHNwZWNpYWw6IGludAogICAgbXljbGFzcyBjMihjMSk7ICAgICAgICAgICAgLy8gY29weQogICAgbXljbGFzcyBjMyhjMik7ICAgICAgICAgICAgLy8gc3BlY2lhbDogbXljbGFzcyYgKG5vbiBjb25zdCkKICAgIG15Y2xhc3MgYzQoc3RkOjptb3ZlKGMzKSk7IC8vIG1vdmUKICAgIAoKfQ==