aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-07-26 15:41:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-07-26 15:41:04 +0200
commitce307edd9edb4a674ce0cfce734e00b5936d2955 (patch)
tree8860b2b369fcec0d1e4ac4d5b204feda9de37a29
parent33e33d260dddd6adb226814415811926c1a779ae (diff)
Fix for shared_ptr
-rw-r--r--odb/shared-ptr/base.txx25
1 files changed, 21 insertions, 4 deletions
diff --git a/odb/shared-ptr/base.txx b/odb/shared-ptr/base.txx
index a8d5f26..0f823f8 100644
--- a/odb/shared-ptr/base.txx
+++ b/odb/shared-ptr/base.txx
@@ -84,8 +84,8 @@ namespace odb
counter_ops (X const* p) : counter_ (p ? bits::counter (p) : 0) {}
counter_ops (counter_ops const& x) : counter_ (x.counter_) {}
- template <typename Y>
- counter_ops (counter_ops<Y, Y> const& x) : counter_ (x.counter_) {}
+ template <typename Z>
+ counter_ops (counter_ops<Z, Z> const& x) : counter_ (x.counter_) {}
counter_ops&
operator= (counter_ops const& x)
@@ -94,9 +94,9 @@ namespace odb
return *this;
}
- template <typename Y>
+ template <typename Z>
counter_ops&
- operator= (counter_ops<Y, Y> const& x)
+ operator= (counter_ops<Z, Z> const& x)
{
counter_ = x.counter_;
return *this;
@@ -137,6 +137,23 @@ namespace odb
struct counter_ops<shared_base, Y>
{
counter_ops (Y const*) {}
+ counter_ops (counter_ops const&) {}
+
+ template <typename Z>
+ counter_ops (counter_ops<shared_base, Z> const&) {}
+
+ counter_ops&
+ operator= (counter_ops const&)
+ {
+ return *this;
+ }
+
+ template <typename Z>
+ counter_ops&
+ operator= (counter_ops<shared_base, Z> const&)
+ {
+ return *this;
+ }
void
reset (Y const*) {}