11#ifndef SQUID_REFCOUNT_H_
12#define SQUID_REFCOUNT_H_
33 template<
typename... Args>
34 inline static auto Make(Args&&... args) {
54 template <
class Other>
62 C const *newP_ = p.
p_;
78 explicit operator bool()
const {
return p_; }
86 return *
const_cast<C *
>(
p_);
99 template <
class Other>
105 template <
class Other>
117 C const (*tempP_) (
p_);
120 if (tempP_ && tempP_->unlock() == 0)
137 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)
static auto Make(Args &&... args)
bool operator==(const RefCount &p) const
RefCount(const RefCount< Other > &p)
Base::Pointer = Derived::Pointer.