12 FILE *
muteOut(fopen(
"/dev/null",
"w"));
13 std::ofstream
fout(
"/dev/null");
23 if (!std::exchange(
isMuted,
true)) {
31 std::cout.rdbuf(
fout.rdbuf());
32 std::cerr.rdbuf(
fout.rdbuf());
37 if (std::exchange(
isMuted,
false)) {
std::streambuf * cout_sbuf
std::streambuf * cerr_sbuf
std::ofstream fout("/dev/null")
FILE * muteOut(fopen("/dev/null","w"))