Skip to content

Commit

Permalink
Update ex13_53.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooophy committed Jun 28, 2015
1 parent cfab2ed commit 99e8473
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions ch13/ex13_53.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,6 @@ HasPtr& HasPtr::operator=(HasPtr rhs)
return *this;
}

//HasPtr& HasPtr::operator=(const HasPtr &rhs)
//{
// auto newp = new std::string(*rhs.ps);
// delete ps;
// ps = newp;
// i = rhs.i;
// std::cout << "call copy assignment" << std::endl;
// return *this;
//}

//HasPtr& HasPtr::operator=(HasPtr &&rhs) noexcept
//{
// if (this != &rhs)
// {
// delete ps;
// ps = rhs.ps;
// i = rhs.i;
// rhs.ps = nullptr;
// std::cout << "call move assignment" << std::endl;
// }
// return *this;
//}

HasPtr::~HasPtr()
{
std::cout << "call destructor" << std::endl;
Expand All @@ -62,6 +39,5 @@ HasPtr::~HasPtr()

int main()
{

return 0;
return 0;
}

0 comments on commit 99e8473

Please sign in to comment.