11#ifndef SQUID_REFCOUNT_H_
12#define SQUID_REFCOUNT_H_
47 template <
class Other>
55 C const *newP_ = p.
p_;
69 explicit operator bool()
const {
return p_; }
77 return *
const_cast<C *
>(
p_);
90 template <
class Other>
96 template <
class Other>
108 C const (*tempP_) (
p_);
111 if (tempP_ && tempP_->unlock() == 0)
128 return os << p.
getRaw() <<
'*' << p->LockCount();
std::ostream & operator<<(std::ostream &os, const RefCount< C > &p)
void reference(const RefCount &p)
RefCount(const RefCount &p)
bool operator!=(const RefCount &p) const
RefCount & operator=(const RefCount &p)
void dereference(C const *newP=nullptr)
bool operator==(const RefCount &p) const
RefCount(const RefCount< Other > &p)
Base::Pointer = Derived::Pointer.