summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-04-06 11:30:10 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2018-04-06 16:36:31 +0100
commit7b179f8bd9b2292f66188ddb47ae6cf824d7a94a (patch)
treef3a51ba6c3214f716bd0bcd7affd7ecd6b7955e3
parentC++17 (diff)
downloadlibadhocutil-7b179f8bd9b2292f66188ddb47ae6cf824d7a94a.tar.bz2
libadhocutil-7b179f8bd9b2292f66188ddb47ae6cf824d7a94a.tar.xz
libadhocutil-7b179f8bd9b2292f66188ddb47ae6cf824d7a94a.zip
C++17
Remove intrusivePtrBase.
-rw-r--r--libadhocutil/intrusivePtrBase.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/libadhocutil/intrusivePtrBase.h b/libadhocutil/intrusivePtrBase.h
deleted file mode 100644
index 327ac5a..0000000
--- a/libadhocutil/intrusivePtrBase.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef ADHOCUTIL_INTRUSIVEPTRBASE_H
-#define ADHOCUTIL_INTRUSIVEPTRBASE_H
-
-#include <boost/intrusive_ptr.hpp>
-
-/// Base class suitable for use with boost::intrusive_ptr<T>.
-class IntrusivePtrBase {
- protected:
- /// @cond
- inline IntrusivePtrBase() : _refCount(0) { }
- inline virtual ~IntrusivePtrBase() = 0;
-
- mutable unsigned int _refCount;
- friend void intrusive_ptr_release(const IntrusivePtrBase * p);
- friend void intrusive_ptr_add_ref(const IntrusivePtrBase * p);
- private:
- IntrusivePtrBase(const IntrusivePtrBase &) = delete;
- void operator=(const IntrusivePtrBase &) = delete;
-};
-
-inline
-IntrusivePtrBase::~IntrusivePtrBase() = default;
-
-inline
-void
-intrusive_ptr_release(const IntrusivePtrBase * p)
-{
- if (p->_refCount == 1) {
- delete p;
- }
- else {
- p->_refCount -= 1;
- }
-}
-
-inline
-void
-intrusive_ptr_add_ref(const IntrusivePtrBase * p)
-{
- p->_refCount += 1;
-}
-/// @endcond
-
-#endif
-