template<class T, typename = std::enable_if_t<std::is_base_of_v<std::ios_base, T>>>
class stc::testutil::CaptureStream< T, typename >
Utility class for redirecting streams. This is primarily meant for redirecting std::cout, std::cerr, and std::cin, but should work with any standard stream.
This is very useful if you want to test code that takes standard input that you want to simulate entering, or if you want to test the stdout produced in some test.
This function is in the extra module stc::testutil, and should never be used outside tests. It may still work there, but it's not designed to be robust enough to handle real-world use.