Ignore all data passed by the stream operator.
More...
#include <debug/nullstream.h>
|
template<typename T > |
auto | check (T v, OutputStream *p=nullptr) -> decltype(*p<< v, void()) |
| Check if type is supported by output stream.
|
|
Ignore all data passed by the stream operator.
Can be used instead of the OutputStream if (for debugging reasons) all output should be ignored, e.g. for DBG_VERBOSE
By using template programming, a single generic methods is sufficient (which simply discard everything).
◆ NullStream()
NullStream::NullStream |
( |
| ) |
|
|
inline |
Empty default constructor.
◆ check()
template<typename T >
auto NullStream::check |
( |
T |
v, |
|
|
OutputStream * |
p = nullptr |
|
) |
| -> decltype(*p << v, void()) |
|
inlineprivate |
Check if type is supported by output stream.
◆ operator<<()
Generic stream operator for any data type.
Uses template meta programming for a generic & short solution
- Template Parameters
-
- Parameters
-
- Returns
- Reference to the NullStream object allowing concatenation of operators
The documentation for this class was generated from the following file: