equal
deleted
inserted
replaced
33 |
33 |
34 |
34 |
35 namespace metaspace { |
35 namespace metaspace { |
36 |
36 |
37 // A very simple helper class which counts something, offers decrement/increment |
37 // A very simple helper class which counts something, offers decrement/increment |
38 // methods and checks for overflow/underflow on increment/decrement. |
38 // methods and, on debug, checks for overflow/underflow on increment/decrement. |
39 // |
39 // |
40 // (since we seem to do that alot....) |
40 // Two variants exists, a thread-safe one using atomic counting, a normal one |
41 |
41 // which does not. |
42 template <class T> |
42 template <class T> |
43 class AbstractCounter { |
43 class AbstractCounter { |
44 |
44 |
45 T _c; |
45 T _c; |
46 |
46 |