aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-06-06 00:03:21 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-06-06 00:03:21 +0000
commitd904570ca82f819c87ce14babd789c5dd1106d52 (patch)
tree0bb8816de235a0174e01ffbb98185c70a03b3bf0
parentda74e547c26d417efffcff3cc0e78ff302b622ba (diff)
downloadpaludis-d904570ca82f819c87ce14babd789c5dd1106d52.tar.gz
paludis-d904570ca82f819c87ce14babd789c5dd1106d52.tar.xz
Allow upcasts on construction
-rw-r--r--paludis/util/counted_ptr.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/paludis/util/counted_ptr.hh b/paludis/util/counted_ptr.hh
index c433aa6..177d1b8 100644
--- a/paludis/util/counted_ptr.hh
+++ b/paludis/util/counted_ptr.hh
@@ -484,7 +484,8 @@ namespace paludis
*/
template <typename O_>
CountedPtr(const CountedPtr<O_, count_policy::InternalCountTag> & other) :
- counted_ptr_internals::CountedPtrBase<T_, DereferencePolicy_>(other.raw_pointer())
+ counted_ptr_internals::CountedPtrBase<T_, DereferencePolicy_>(
+ static_cast<T_ *>(other.raw_pointer()))
{
if (0 != this->_ptr)
++*this->_ptr->reference_count_pointer();