diff options
Diffstat (limited to 'include/istream')
-rw-r--r-- | include/istream | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/istream b/include/istream index d6217bbb8009..bfbe5f24728e 100644 --- a/include/istream +++ b/include/istream @@ -1619,7 +1619,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x) __is.rdbuf()->sbumpc(); } __x = bitset<_Size>(__str); - if (__c == 0) + if (_Size > 0 && __c == 0) __state |= ios_base::failbit; #ifndef _LIBCPP_NO_EXCEPTIONS } |