xo-indentlog: fix log_streambuf unit test + string_view operator

This commit is contained in:
Roland Conybeare 2026-01-20 16:40:23 -05:00
commit a537cb3d1f
2 changed files with 16 additions and 7 deletions

View file

@ -4,6 +4,7 @@
#include "print/quoted_char.hpp"
#include <iostream>
#include <string_view>
#include <vector>
#include <cstring> // e.g. for std::memcpy()
#include <cstdint>
@ -71,6 +72,8 @@ namespace xo {
bool debug_flag() const { return debug_flag_; }
operator std::basic_string_view<CharT> () const { return std::basic_string_view<CharT>(this->pbase(), this->pptr()); }
void reset_stream() {
char * p_lo = &(this->buf_v_[0]);
char * p_hi = p_lo + this->capacity();