projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4eaf8ef
)
peek should set eofbit if sgetc() returns eof.
author
Howard Hinnant
<hhinnant@apple.com>
Thu, 1 Nov 2012 17:32:07 +0000
(17:32 +0000)
committer
Howard Hinnant
<hhinnant@apple.com>
Thu, 1 Nov 2012 17:32:07 +0000
(17:32 +0000)
llvm-svn: 167238
libcxx/include/istream
patch
|
blob
|
history
diff --git
a/libcxx/include/istream
b/libcxx/include/istream
index
72b2004
..
7b48186
100644
(file)
--- a/
libcxx/include/istream
+++ b/
libcxx/include/istream
@@
-1189,7
+1189,11
@@
basic_istream<_CharT, _Traits>::peek()
#endif // _LIBCPP_NO_EXCEPTIONS
sentry __sen(*this, true);
if (__sen)
+ {
__r = this->rdbuf()->sgetc();
+ if (traits_type::eq_int_type(__r, traits_type::eof()))
+ this->setstate(ios_base::eofbit);
+ }
#ifndef _LIBCPP_NO_EXCEPTIONS
}
catch (...)