Bring back the constructor-enabled enable_shared_from_this as enable_shared_from_this2.

[SVN r51912]
This commit is contained in:
Peter Dimov
2009-03-22 21:11:17 +00:00
parent 6f2bdddfa0
commit d34d638998
5 changed files with 254 additions and 72 deletions
+5
View File
@@ -124,6 +124,11 @@ public:
return pn.use_count() == 0;
}
bool _empty() const // extension, not in std::weak_ptr
{
return pn.empty();
}
void reset() // never throws in 1.30+
{
this_type().swap(*this);