xo-indentlog: fix log_streambuf unit test + string_view operator
This commit is contained in:
parent
6ccb69c693
commit
a537cb3d1f
2 changed files with 16 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue