...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 { // construct/copy/destruct callback_cleaner(boost::function< void()>); ~callback_cleaner(); // public data members boost::function< void()> m_cleaner_callback; std::ofstream m_file; }; // construct/copy/destruct explicit stream_holder(std::ostream & = std::cout); // public member functions void setup(const const_string &, boost::function< void()> const & = boost::function< void()>()); std::ostream & ref() const; };