#include "debug.h" debug_ostream debug_cout; debug_ostream::debug_ostream(): m_active(false) {} void debug_ostream::activate() { m_active = true; } void debug_ostream::deactivate() { m_active = false; } debug_ostream& debug_ostream::operator<<( std::basic_ostream& (*func) (std::basic_ostream&) ) { if (m_active) std::cout << *func; return *this; }