#include #include using Data = const std::string; #include "y_pair.h" int main() { Y_Pair p{new std::string{"Thelma"}, new std::string{"Louise"}}; std::cout << p.get_first() << " and " << p.get_second() << std::endl; p.swap(); std::cout << p.get_first() << " and " << p.get_second() << std::endl; Y_Pair a{new std::string{"Tom"}, new std::string{"Jerry"}}; Y_Pair b{new std::string{"Butch"}, new std::string{"Sundance"}}; Y_Pair c{std::move(a)}; c = std::move(b); // Y_Pair d{a}; // should be compile error // d = c; // should be compile error std::cout << c.get_first() << " and " << c.get_second() << std::endl; return 0; }