Skip to content

Instantly share code, notes, and snippets.

@bdonlan
Created October 28, 2008 06:18
Show Gist options
  • Save bdonlan/20313 to your computer and use it in GitHub Desktop.
Save bdonlan/20313 to your computer and use it in GitHub Desktop.
template<typename T>
struct DebugCounter {
static int value;
};
template<typename T>
int DebugCounter<T>::value = 0;
#define DEBUG_COUNTER(name) \
DebugCounter<struct DebugCounter_tag_##name>::value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment