Debian Codegraph @

3rdparty/catch2/fuzzing/NullOStream.h

raw symbols SCIP
1 #pragma once
2
3 #include <ostream>
4 #include <streambuf>
5
6 // from https://stackoverflow.com/a/8244052
7 class NullStreambuf : public std::streambuf {
8 char dummyBuffer[64];
9
10 protected:
11 virtual int overflow(int c) override final;
12 };
13
14 class NullOStream final : private NullStreambuf, public std::ostream {
15 public:
16 NullOStream() : std::ostream(this) {}
17 NullStreambuf *rdbuf() { return this; }
18 virtual void avoidOutOfLineVirtualCompilerWarning();
19 };
20