diff --git a/persistent-data/data-structures/ref_counter.h b/persistent-data/data-structures/ref_counter.h index 88937e8..99e17cd 100644 --- a/persistent-data/data-structures/ref_counter.h +++ b/persistent-data/data-structures/ref_counter.h @@ -30,13 +30,18 @@ namespace persistent_data { boost::shared_ptr > ptr; virtual ~ref_counter() {} - virtual void set(ValueType const &v, uint32_t rc) {} - virtual void inc(ValueType const &v) {} - virtual void dec(ValueType const &v) {} + + virtual void set(ValueType const &v, uint32_t rc) = 0; + virtual void inc(ValueType const &v) = 0; + virtual void dec(ValueType const &v) = 0; }; template - class no_op_ref_counter : public ref_counter { + class no_op_ref_counter final : public ref_counter { + public: + virtual void set(ValueType const &v, uint32_t rc) {} + virtual void inc(ValueType const &v) {} + virtual void dec(ValueType const &v) {} }; }