diff options
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -6,17 +6,11 @@ class debug_ostream { public: - debug_ostream(): m_active(false) {} + debug_ostream(); - void activate() - { - m_active = true; - } + void activate(); - void deactivate() - { - m_active = false; - } + void deactivate(); template<typename T> debug_ostream& operator<<(const T& arg) { @@ -27,11 +21,7 @@ public: debug_ostream& operator<<( std::basic_ostream<char>& (*func) - (std::basic_ostream<char>&) ) { - if (m_active) - std::cout << *func; - return *this; - } + (std::basic_ostream<char>&) ); private: bool m_active; |