21 using ValueType = NumberType;
23 CounterImpl() =
default;
25 CounterImpl(CounterImpl
const&) =
delete;
27 CounterImpl(CounterImpl&& other) =
default;
30 operator=(CounterImpl
const&) =
delete;
32 operator=(CounterImpl&&) =
default;
35 add(ValueType
const value)
41 set(ValueType
const value)
49 return value_->value();
53 AtomicPtr<ValueType> value_ = std::make_unique<Atomic<ValueType>>(0);