...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::unit_test::runtime_config::stream_holder
// In header: <boost/test/unit_test_parameters.hpp> class stream_holder { public: // member classes/structs/unions struct callback_cleaner { // public member functions callback_cleaner(boost::function< void()>); ~callback_cleaner(); // public data members boost::function< void()> m_cleaner_callback; std::ofstream m_file; }; // public member functions explicit stream_holder(std::ostream & = std::cout); void setup(const const_string &, boost::function< void()> const & = boost::function< void()>()); std::ostream & ref() const; };