#include <ext/cdbg>
Provides stream objects for debug-oriented output. On Windows the stream buffer writes through OutputDebugString, with Qt it writes through qDebug, and otherwise it falls back to standard console streams.
ext::cdbgis the narrow debug stream.ext::wcdbgis the wide-character debug stream.ext::debug_streambuf<CharT>is the stream buffer adapter behind those streams.- Stream insertion operators are used in the same style as
std::coutandstd::wcout.
- This is intended for diagnostic logging with platform-specific debug sinks.
- For debugger detection and waiting, see
debug_utils.
- GCC 8.3.0+
- Clang 10.0+
- Visual Studio 2008 SP1+
- Sends a string to the platform debug output stream.
-
Like OutputDebugStringA
#include <ext/cdbg> ext::cdbg << "test\n";
-
Like OutputDebugStringW
#include <ext/cdbg> ext::wcdbg << L"test\n";
-