diagnose.h
Go to the documentation of this file.
1 #ifndef TTG_DIAGNOSE_H
2 #define TTG_DIAGNOSE_H
3 
4 namespace ttg {
5  namespace detail {
6  inline bool &diagnose_accessor() {
7  static bool diagnose = true;
8  return diagnose;
9  }
10  } // namespace detail
11 
12  inline bool diagnose() { return detail::diagnose_accessor(); }
13  inline void diagnose_on() { detail::diagnose_accessor() = true; }
14  inline void diagnose_off() { detail::diagnose_accessor() = false; }
15 
16 } // namespace ttg
17 
18 #endif // TTG_DIAGNOSE_H
bool & diagnose_accessor()
Definition: diagnose.h:6
top-level TTG namespace contains runtime-neutral functionality
Definition: keymap.h:8
void diagnose_on()
Definition: diagnose.h:13
bool diagnose()
Definition: diagnose.h:12
void diagnose_off()
Definition: diagnose.h:14