18 template<
typename... T>
19 TeeBuf(T&&... streamBufs) : m_StreamBufs({{streamBufs.rdbuf()...}})
27 virtual int overflow(
int c)
override 34 for(
auto &s: m_StreamBufs) {
35 if(s->sputc(c) == EOF) {
39 return anyEOF ? EOF : c;
44 virtual int sync()
override 46 bool anyNonZero =
false;
47 for(
auto &s: m_StreamBufs) {
48 if(s->pubsync() != 0) {
53 return anyNonZero ? -1 : 0;
59 const std::vector<std::streambuf*> m_StreamBufs;
68 template<
typename... T>
70 :
std::ostream(&m_TeeBuf), m_TeeBuf(
std::forward<T>(streamBufs)...)
Helper class for generating code - automatically inserts brackets, indents etc.
Definition: backendBase.h:30
Definition: teeStream.h:14
TeeStream(T &&... streamBufs)
Definition: teeStream.h:69
TeeBuf(T &&... streamBufs)
Definition: teeStream.h:19
Definition: teeStream.h:65