Skip to content

EOF flag not set on exhausted input streams. #1340

@mefyl

Description

@mefyl

When reaching the end of a stream while parsing JSON, the eofbit is not set.

std::stringstream s;
try { json j ; j >> s; } catch (...) {}
s.eof(); // false

This seems like a reasonable expected behaviour, as our existing code relies of eofbit to determine when the end of a continuous stream of json commands is reached.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions