void WriteCML (const cmemlink& l) { cout.format ("cmemlink{%zu}: ", l.size()); const void* pv = l.cdata(); const char* pc = reinterpret_cast<const char*>(pv); size_t nc = l.size(); if (pc[nc - 1] == 0) -- nc; cout.write (l.begin(), nc); cout << endl; }
static void WriteCML (const cmemlink& l) { cout << "cmemlink{" << l.size() << "}: "; const void* pv = l.cdata(); const char* pc = reinterpret_cast<const char*>(pv); size_t nc = l.size(); if (pc[nc - 1] == 0) -- nc; cout.write (l.begin(), nc); cout << endl; }
/// Writes the contents of \p buf into the stream. void ostringstream::write (const cmemlink& buf) { if (remaining() < buf.size() && overflow(buf.size()) < buf.size()) return; ostream::write (buf); }