11 lignes
190 B
C++
11 lignes
190 B
C++
|
|
||
|
#include <memory>
|
||
|
|
||
|
void copy_ptr(std::shared_ptr<int>& a, std::shared_ptr<int> const& b) {
|
||
|
a = b;
|
||
|
}
|
||
|
|
||
|
void move_ptr(std::shared_ptr<int>& a, std::shared_ptr<int>& b) {
|
||
|
a = std::move(b);
|
||
|
}
|