ROSE 0.11.145.192
|
Track recursion depth in a function.
Use it like this:
You might ask, "Why use this class instead of just saying <code>++depth</code> and <code>--depth</code>?". If you use this class you don't have to remember to decrement the depth, especially if you (or someone else) adds additional return
statements later, or if anything can throw and exception.
Definition at line 23 of file RecursionCounter.h.
#include <Rose/RecursionCounter.h>
Public Member Functions | |
RecursionCounter (size_t &depth) | |
Public Attributes | |
size_t & | depth |
|
inline |
Definition at line 26 of file RecursionCounter.h.
|
inline |
Definition at line 30 of file RecursionCounter.h.
size_t& Rose::RecursionCounter::depth |
Definition at line 24 of file RecursionCounter.h.