ROSE  0.11.87.0
Rose/RecursionCounter.h
1 #ifndef ROSE_RecursionCounter_H
2 
3 namespace Rose {
4 
23  size_t &depth;
24 
25  RecursionCounter(size_t &depth): depth(depth) {
26  ++depth;
27  }
28 
29  ~RecursionCounter() {
30  --depth;
31  }
32 };
33 
34 } // namespace
35 
36 #endif
Main namespace for the ROSE library.
Track recursion depth in a function.