| 9402 | /////////////////////////////////////////////////////////////////////////// |
| 9403 | |
| 9404 | auto makeStream(StringRef const &filename) -> IStream const * { |
| 9405 | if (filename.empty()) |
| 9406 | return new detail::CoutStream(); |
| 9407 | else if (filename[0] == '%') { |
| 9408 | if (filename == "%debug") |
| 9409 | return new detail::DebugOutStream(); |
| 9410 | else |
| 9411 | CATCH_ERROR("Unrecognised stream: '" << filename << "'"); |
| 9412 | } else |
| 9413 | return new detail::FileStream(filename); |
| 9414 | } |
| 9415 | |
| 9416 | // This class encapsulates the idea of a pool of ostringstreams that can be reused. |
| 9417 | struct StringStreams { |