20 char* begin =
const_cast<char*
>(view.data());
21 char* end = begin + view.size();
22 this->
setg(begin, begin, end);
26 std::streamsize xsgetn(
char*
s, std::streamsize
count)
override {
30 std::memcpy(
s, this->
gptr(),
static_cast<size_t>(
n));
31 this->
gbump(
static_cast<int>(
n));
37 std::ios_base::openmode
which = std::ios_base::in)
override {
38 if (!(
which & std::ios_base::in)) {
42 const auto begin = this->
eback();
44 const auto end = this->
egptr();
47 if (
dir == std::ios_base::beg) {
50 else if (
dir == std::ios_base::cur) {
53 else if (
dir == std::ios_base::end) {
54 base =
static_cast<off_type>(end - begin);
66 this->
setg(begin, begin + next, end);
71 std::ios_base::openmode
which = std::ios_base::in)
override {
85 : std::istream(
nullptr), _buf(view) {
Borrow a row and error state for synchronous, single-pass field access.
streambuf adapter over csv::string_view with no data copy.
Lightweight istream over csv::string_view with zero copy.
A standalone header file containing shared code.
The all encompassing namespace.
std::string_view string_view
The string_view class used by this library.