forked from boostorg/smart_ptr
Removed redundant copy constructor and copy assignment.
[SVN r17043]
This commit is contained in:
@ -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"; }
|
||||
|
@ -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
|
||||
};
|
||||
|
Reference in New Issue
Block a user