Does C++ support compile-time counters?
Well… yes, template metaprogramming lacks side effects as it is intended. I was misled by a bug in older versions of GCC and a little unclear wording in the Standard to believe that all those features were possible. However, at least the namespace-scope functionality can be achieved with little use of templates at all. Function … Read more