spy() returns a Reader that copies all reads from the Reader r to the Writer s, using the given optional prefix.
| 231 | // spy() returns a Reader that copies all reads from the Reader r to the Writer |
| 232 | // s, using the given optional prefix. |
| 233 | std::shared_ptr<Reader> spy(const std::shared_ptr<Reader>& r, |
| 234 | const std::shared_ptr<Writer>& s, |
| 235 | const char* prefix /* = "\n<-" */) { |
| 236 | return std::make_shared<ReaderSpy>(r, s, prefix); |
| 237 | } |
| 238 | |
| 239 | // spy() returns a Writer that copies all writes to the Writer w to the Writer |
| 240 | // s, using the given optional prefix. |