[libcxx] r251246 - Fix LWG#2244: basic_istream::seekg
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 25 11:31:51 PDT 2015
Author: marshall
Date: Sun Oct 25 13:31:51 2015
New Revision: 251246
URL: http://llvm.org/viewvc/llvm-project?rev=251246&view=rev
Log:
Fix LWG#2244: basic_istream::seekg
Modified:
libcxx/trunk/include/istream
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
libcxx/trunk/www/cxx1z_status.html
Modified: libcxx/trunk/include/istream
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/istream?rev=251246&r1=251245&r2=251246&view=diff
==============================================================================
--- libcxx/trunk/include/istream (original)
+++ libcxx/trunk/include/istream Sun Oct 25 13:31:51 2015
@@ -1407,6 +1407,7 @@ basic_istream<_CharT, _Traits>::seekg(of
try
{
#endif // _LIBCPP_NO_EXCEPTIONS
+ this->clear(this->rdstate() & ~ios_base::eofbit);
sentry __sen(*this, true);
if (__sen)
{
Modified: libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp?rev=251246&r1=251245&r2=251246&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp Sun Oct 25 13:31:51 2015
@@ -71,4 +71,13 @@ int main()
assert(is.fail());
assert(seekoff_called == 4);
}
+ {
+ testbuf<char> sb(" 123456789");
+ std::istream is(&sb);
+ is.setstate(std::ios_base::eofbit);
+ assert(is.eof());
+ is.seekg(5, std::ios_base::beg);
+ assert(is.good());
+ assert(!is.eof());
+ }
}
Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=251246&r1=251245&r2=251246&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Sun Oct 25 13:31:51 2015
@@ -159,7 +159,7 @@
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2219">2219</a></td><td><tt><i>INVOKE</i></tt>-ing a pointer to member with a <tt>reference_wrapper</tt> as the object expression</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2224">2224</a></td><td>Ambiguous status of access to non-live objects</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2234">2234</a></td><td><tt>assert()</tt> should allow usage in constant expressions</td><td>Kona</td><td></td></tr>
- <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2244">2244</a></td><td>Issue on <tt>basic_istream::seekg</tt></td><td>Kona</td><td>Patch Ready</td></tr>
+ <tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2244">2244</a></td><td>Issue on <tt>basic_istream::seekg</tt></td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2250">2250</a></td><td>Follow-up On Library Issue 2207</td><td>Kona</td><td></td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2259">2259</a></td><td>Issues in 17.6.5.5 rules for member functions</td><td>Kona</td><td>Complete</td></tr>
<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2273">2273</a></td><td><tt>regex_match</tt> ambiguity</td><td>Kona</td><td></td></tr>
More information about the cfe-commits
mailing list