memgraph/utils/counters/simple_counter.hpp
2015-12-07 21:51:55 +01:00

22 lines
245 B
C++

#pragma once
template <class T>
class SimpleCounter
{
public:
SimpleCounter(T initial) : counter(initial) {}
T next()
{
return ++counter;
}
T count()
{
return counter;
}
private:
T counter;
};