| 61 | } |
| 62 | |
| 63 | void autoOpenConsole(bool attach, bool alloc) |
| 64 | { |
| 65 | // putting cin in a filtering_ostreambuf makes it stop responding directly on Enter keypresses, and instead |
| 66 | // you need to press Ctrl+C the same amount of times as the number of elements in the filter chain. |
| 67 | /* |
| 68 | static std::streambuf& orig_cout_buf(*std::cout.rdbuf()); |
| 69 | static std::streambuf& orig_cerr_buf(*std::cerr.rdbuf()); |
| 70 | static std::unique_ptr<io::filtering_ostreambuf> auto_cout_buf; |
| 71 | static std::unique_ptr<io::filtering_ostreambuf> auto_cerr_buf; |
| 72 | auto_cout_buf = std::make_unique<io::filtering_ostreambuf>(OpenConsoleFilter(attach, alloc) | boost::ref(orig_cout_buf)); |
| 73 | auto_cerr_buf = std::make_unique<io::filtering_ostreambuf>(OpenConsoleFilter(attach, alloc) | boost::ref(orig_cerr_buf)); |
| 74 | std::cout.rdbuf(auto_cout_buf.get()); |
| 75 | std::cerr.rdbuf(auto_cerr_buf.get()); |
| 76 | */ |
| 77 | } |
| 78 | } |
no outgoing calls
no test coverage detected