diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-04 11:28:20 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-04 11:28:20 +0100 |
commit | b2c35cdf69a9084806ac7930cf4475980d596cf6 (patch) | |
tree | b74b8f2ee2c66c59f7385407cfc34c2a0a16961f /debug.h | |
parent | aaafcea7e26791acbf5b9612e3fb396edcdfcc8f (diff) |
Separate out implementation from headers
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; |