Added a default constructor to shared_count and shared_ptr for incomplete types (void).

[SVN r12815]
This commit is contained in:
Peter Dimov committed 2002-02-15 13:31:58 +00:00
1 parent 5e2f514140
commit 5a6cd1cf3e
3 files changed
+57 -14

No files matched your search

+5 -1
View File
@@ -186,6 +186,10 @@ private:
public:
shared_count(): pi_(new counted_base(1, 1))
{
}
template<class P, class D> shared_count(P p, D d): pi_(0)
{
try
@@ -221,7 +225,7 @@ public:
pi_->add_ref();
}
explicit shared_count(weak_count const & r); // throws bad_weak_to_shared_cast when r.use_count() == 0
explicit shared_count(weak_count const & r); // throws use_count_is_zero when r.use_count() == 0
shared_count & operator= (shared_count const & r) // nothrow
{