Fix LWG#2244: basic_istream::seekg
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@251246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd33deb083
commit
dbef2bb1d0
@ -1407,6 +1407,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
|
||||
try
|
||||
{
|
||||
#endif // _LIBCPP_NO_EXCEPTIONS
|
||||
this->clear(this->rdstate() & ~ios_base::eofbit);
|
||||
sentry __sen(*this, true);
|
||||
if (__sen)
|
||||
{
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user