40 using ValueType = NumberType;
42 CounterImpl() =
default;
44 CounterImpl(CounterImpl
const&) =
delete;
46 CounterImpl(CounterImpl&& other) =
default;
49 operator=(CounterImpl
const&) =
delete;
51 operator=(CounterImpl&&) =
default;
54 add(ValueType
const value)
60 set(ValueType
const value)
68 return value_->value();
72 AtomicPtr<ValueType> value_ = std::make_unique<Atomic<ValueType>>(0);