1 #ifndef DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000 2 #define DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000 4 #if defined(_MSC_VER) || \ 5 (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ 6 (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 10 #include "exceptions.h" 26 DeepRecursion(
int depth,
const Mark& mark_,
const std::string& msg_);
48 template <
int max_depth = 2000>
51 DepthGuard(
int & depth_,
const Mark& mark_,
const std::string& msg_) : m_depth(depth_) {
53 if ( max_depth <= m_depth ) {
67 int current_depth()
const {
77 #endif // DEPTH_GUARD_H_00000000000000000000000000000000000000000000000000000000 The DeepRecursion class An exception class which is thrown by DepthGuard.
Definition: depthguard.h:22
The DepthGuard class DepthGuard takes a reference to an integer.
Definition: depthguard.h:49