25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
190B

  1. #include <memory>
  2. void copy_ptr(std::shared_ptr<int>& a, std::shared_ptr<int> const& b) {
  3. a = b;
  4. }
  5. void move_ptr(std::shared_ptr<int>& a, std::shared_ptr<int>& b) {
  6. a = std::move(b);
  7. }