From b2c35cdf69a9084806ac7930cf4475980d596cf6 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Jan 2025 11:28:20 +0100 Subject: Separate out implementation from headers --- debug.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'debug.h') diff --git a/debug.h b/debug.h index 1965de0..335cd6e 100644 --- a/debug.h +++ b/debug.h @@ -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 debug_ostream& operator<<(const T& arg) { @@ -27,11 +21,7 @@ public: debug_ostream& operator<<( std::basic_ostream& (*func) - (std::basic_ostream&) ) { - if (m_active) - std::cout << *func; - return *this; - } + (std::basic_ostream&) ); private: bool m_active; -- cgit v1.2.3