#include <iostream>
#include <memory>

using namespace std;

class A {
public:
	A() {
		cout << "Default constructor" << endl;
	}
	
	A( const A& a ) {
		cout << "Copy constructor" << endl;
	}
	
	~A() {}
};

void foo( std::shared_ptr< A > a )
{
	auto b = a;
}

int main() {
	
	foo( std::shared_ptr< A >( new A() ) );
	
	return 0;
}