diff --git a/src/cxxopts.hpp b/src/cxxopts.hpp index 2059a4a..993ca68 100644 --- a/src/cxxopts.hpp +++ b/src/cxxopts.hpp @@ -387,7 +387,7 @@ namespace cxxopts throw argument_incorrect_type(text); } - if (!is.eof()) + if (is.rdbuf()->in_avail() != 0) { throw argument_incorrect_type(text); }