7#ifndef gbLAB_STATICID_H_
8#define gbLAB_STATICID_H_
55 if (newCount <
count) {
56 throw std::runtime_error(
57 "StaticID error: YOU ARE TRYING TO SET THE COUNTER TO A LOWER VALUE "
58 "THAN THE CURRENT ONE\n");
66 if (newIncrement < 1) {
67 throw std::runtime_error(
"StaticID error: newIncrement MUST BE >=1\n");
71 count += newIncrement;
A class template that implements a counter of the number of instances of Derived type that are create...
static size_t & get_count()
static void set_increment(const size_t &newIncrement)
const size_t sID
The static ID of this.
static void set_count(const size_t &newCount)
StaticID(const StaticID &)