25 #ifndef INCLUDED_OptionalStream_h_GUID_2C133DE4_22D9_4195_B36E_0663DF0A6378
26 #define INCLUDED_OptionalStream_h_GUID_2C133DE4_22D9_4195_B36E_0663DF0A6378
72 (*m_os) << std::forward<T>(rhs);
87 std::ostream *m_os =
nullptr;
90 inline detail::OptionalStream outputIf(std::ostream &os,
bool condition) {
91 return condition ? detail::OptionalStream{os}
92 : detail::OptionalStream{};
94 inline detail::OptionalStream outputUnless(std::ostream &os,
96 return !condition ? detail::OptionalStream{os}
97 : detail::OptionalStream{};
101 #endif // INCLUDED_OptionalStream_h_GUID_2C133DE4_22D9_4195_B36E_0663DF0A6378
OptionalStream & operator<<(T &&rhs)
OptionalStream(std::ostream &os)
Construct with a stream for use.
OptionalStream & operator<<(T const &rhs)
Stream me anything! (I might do nothing with it, but...)
OptionalStream()
Nothing to stream to.
OptionalStream(OptionalStream &&other)