[C++11] Special member functions for move semantics
복사 생성자와 복사 대입 연산자는 복사본이 만들어질 때 호출됐었다. 하지만 C++11의 `move semantics`가 생기면서 `move constructor`와 `move assignment operator`를 만들 수 있게 되었다. #include class B { public: std::string s; B() : s{"test"} {std::cout
C++/Modern C++(11, 14, 17, 20)
2023. 8. 24. 17:18