We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a194154 commit e5c0340Copy full SHA for e5c0340
1 file changed
src/spanstream.h
@@ -44,6 +44,15 @@ class spanstream : public std::istream
44
}
45
46
47
+ std::streamsize xsgetn(char *s, std::streamsize n) override {
48
+ if (position + n <= buffer_size) {
49
+ std::copy(buffer + position, buffer + position + n, s);
50
+ position += n;
51
+ return n;
52
+ }
53
+ return 0;
54
55
+
56
int_type underflow() override {
57
return (position < buffer_size) ? buffer[position] : traits_type::eof();
58
0 commit comments