cxx-benchmarks/test-copy-shared-ptr-impl.cpp

11 wiersze
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);
}