From 2dbfc89d4e557326704d386d50a17c76d73f2146 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 25 Jan 2003 16:51:45 +0000 Subject: [PATCH] Removed redundant copy constructor and copy assignment. [SVN r17043] --- example/shared_ptr_example2.cpp | 4 ---- example/shared_ptr_example2.hpp | 6 ++---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/example/shared_ptr_example2.cpp b/example/shared_ptr_example2.cpp index 746dd48..e062a1f 100644 --- a/example/shared_ptr_example2.cpp +++ b/example/shared_ptr_example2.cpp @@ -10,10 +10,6 @@ class example::implementation }; example::example() : _imp( new implementation ) {} -example::example( const example & s ) : _imp( s._imp ) {} - -example & example::operator=( const example & s ) - { _imp = s._imp; return *this; } void example::do_something() { std::cout << "use_count() is " << _imp.use_count() << "\n"; } diff --git a/example/shared_ptr_example2.hpp b/example/shared_ptr_example2.hpp index 93b77e5..9b63fc9 100644 --- a/example/shared_ptr_example2.hpp +++ b/example/shared_ptr_example2.hpp @@ -14,12 +14,10 @@ class example { - public: +public: example(); - example( const example & ); - example & operator=( const example & ); void do_something(); - private: +private: class implementation; boost::shared_ptr< implementation > _imp; // hide implementation details };