2002-05-15 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/6648
* include/bits/istream.tcc (istream::getline, ignore):
Upon __idelim (__delim) call sbumpc() not snextc().
* testsuite/27_io/narrow_stream_objects.cc:
Add test08 and test09.
From-SVN: r53557
* docs/html/faq/index.html: Update not-a-bug list with basic_file.h.
* docs/html/faq/index.txt: Regenerate.
+2002-05-15 Paolo Carlini <pcarlini@unitus.it>
+
+ PR libstdc++/6648
+ * include/bits/istream.tcc (istream::getline, ignore):
+ Upon __idelim (__delim) call sbumpc() not snextc().
+ * testsuite/27_io/narrow_stream_objects.cc:
+ Add test08 and test09.
+
2002-05-14 Release Manager
* GCC 3.1 Released.
{
if (__c == __idelim)
{
- __sb->snextc();
+ __sb->sbumpc();
++_M_gcount;
}
else
this->setstate(ios_base::eofbit);
else if (__c == __delim)
{
- __sb->snextc();
+ __sb->sbumpc();
++_M_gcount;
}
}
VERIFY( s == "test" );
}
+// libstdc++/6648
+// Interactive tests: each one (run alone) must terminate upon a single '\n'.
+void test08()
+{
+ bool test = true;
+ char buff[2048];
+ std::cout << "Enter name: ";
+ std::cin.getline(buff, 2048);
+}
+
+void test09()
+{
+ bool test = true;
+ std::cout << "Enter name: ";
+ std::cin.ignore(2048, '\n');
+}
+
int
main()
{
// test05();
// test06();
// test07();
+ // test08();
+ // test09();
return 0;
}