Unverified Commit fc2f7116 authored by Niels Lohmann's avatar Niels Lohmann Committed by GitHub

Merge pull request #2756 from nlohmann/issue2755

replace EOF with std::char_traits<char>::eof()
parents d4f44659 b08139ea
...@@ -105,7 +105,7 @@ class input_stream_adapter ...@@ -105,7 +105,7 @@ class input_stream_adapter
{ {
auto res = sb->sbumpc(); auto res = sb->sbumpc();
// set eof manually, as we don't use the istream interface. // set eof manually, as we don't use the istream interface.
if (JSON_HEDLEY_UNLIKELY(res == EOF)) if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))
{ {
is->clear(is->rdstate() | std::ios::eofbit); is->clear(is->rdstate() | std::ios::eofbit);
} }
......
...@@ -5332,7 +5332,7 @@ class input_stream_adapter ...@@ -5332,7 +5332,7 @@ class input_stream_adapter
{ {
auto res = sb->sbumpc(); auto res = sb->sbumpc();
// set eof manually, as we don't use the istream interface. // set eof manually, as we don't use the istream interface.
if (JSON_HEDLEY_UNLIKELY(res == EOF)) if (JSON_HEDLEY_UNLIKELY(res == std::char_traits<char>::eof()))
{ {
is->clear(is->rdstate() | std::ios::eofbit); is->clear(is->rdstate() | std::ios::eofbit);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment