You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/28 20:38:29 UTC
[jira] Created: (STDCXX-230) std::basic_istream::gcount() broken
std::basic_istream::gcount() broken
-----------------------------------
Key: STDCXX-230
URL: http://issues.apache.org/jira/browse/STDCXX-230
Project: C++ Standard Library
Type: Bug
Components: 27. Input/Output
Environment: all
Reporter: Martin Sebor
Moved from the Rogue Wave bug tracking database:
****Created By: pedretti @ Apr 18, 2001 03:51:32 PM****
basic_istream<>::gcount() is not ignoring characters consumed in formatted extraction operations.
[ example program: ]
#include <sstream>
#include <iostream>
using namespace std;
int main () {
stringstream ss;
string s;
int i;
char c;
ss << "12345 5678 hello world" << ends;
cout << "gcount() before extraction : " << ss.gcount() << endl;
ss >> i;
cout << "gcount() after formatted extraction of int: "
<< ss.gcount() << endl;
ss >> i;
cout << "gcount() after 2nd formatted extraction of int: "
<< ss.gcount() << endl;
ss >> s;
cout << "gcount() after formatted extraction of string: " << ss.gcount() << endl;
while (ss) {
ss >> c;
cout << "gcount() after formatted extraction of char: " << ss.gcount() << endl;
}
}
[output:]
gcount() before extraction : 0
gcount() after formatted extraction of int: 0
gcount() after 2nd formatted extraction of int: 1
gcount() after formatted extraction of string: 1
gcount() after formatted extraction of char: 2
gcount() after formatted extraction of char: 1
gcount() after formatted extraction of char: 1
gcount() after formatted extraction of char: 1
gcount() after formatted extraction of char: 1
gcount() after formatted extraction of char: 1
gcount() after formatted extraction of char: 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (STDCXX-230) arithmetic extractors affect gcount()
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor updated STDCXX-230:
--------------------------------
Affects Version/s: 4.1.3
4.1.2
Summary: arithmetic extractors affect gcount() (was: std::basic_istream::gcount() broken)
> arithmetic extractors affect gcount()
> -------------------------------------
>
> Key: STDCXX-230
> URL: https://issues.apache.org/jira/browse/STDCXX-230
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 27. Input/Output
> Affects Versions: 4.1.3, 4.1.2
> Environment: all
> Reporter: Martin Sebor
>
> Moved from the Rogue Wave bug tracking database:
> ****Created By: pedretti @ Apr 18, 2001 03:51:32 PM****
> basic_istream<>::gcount() is not ignoring characters consumed in formatted extraction operations.
> [ example program: ]
> #include <sstream>
> #include <iostream>
> using namespace std;
> int main () {
> stringstream ss;
> string s;
> int i;
> char c;
>
> ss << "12345 5678 hello world" << ends;
> cout << "gcount() before extraction : " << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after formatted extraction of int: "
> << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after 2nd formatted extraction of int: "
> << ss.gcount() << endl;
>
> ss >> s;
> cout << "gcount() after formatted extraction of string: " << ss.gcount() << endl;
>
> while (ss) {
> ss >> c;
> cout << "gcount() after formatted extraction of char: " << ss.gcount() << endl;
>
> }
> }
> [output:]
> gcount() before extraction : 0
> gcount() after formatted extraction of int: 0
> gcount() after 2nd formatted extraction of int: 1
> gcount() after formatted extraction of string: 1
> gcount() after formatted extraction of char: 2
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (STDCXX-230) arithmetic extractors affect gcount()
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor reassigned STDCXX-230:
-----------------------------------
Assignee: Martin Sebor
> arithmetic extractors affect gcount()
> -------------------------------------
>
> Key: STDCXX-230
> URL: https://issues.apache.org/jira/browse/STDCXX-230
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 27. Input/Output
> Affects Versions: 4.1.3, 4.1.2
> Environment: all
> Reporter: Martin Sebor
> Assigned To: Martin Sebor
>
> Moved from the Rogue Wave bug tracking database:
> ****Created By: pedretti @ Apr 18, 2001 03:51:32 PM****
> basic_istream<>::gcount() is not ignoring characters consumed in formatted extraction operations.
> [ example program: ]
> #include <sstream>
> #include <iostream>
> using namespace std;
> int main () {
> stringstream ss;
> string s;
> int i;
> char c;
>
> ss << "12345 5678 hello world" << ends;
> cout << "gcount() before extraction : " << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after formatted extraction of int: "
> << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after 2nd formatted extraction of int: "
> << ss.gcount() << endl;
>
> ss >> s;
> cout << "gcount() after formatted extraction of string: " << ss.gcount() << endl;
>
> while (ss) {
> ss >> c;
> cout << "gcount() after formatted extraction of char: " << ss.gcount() << endl;
>
> }
> }
> [output:]
> gcount() before extraction : 0
> gcount() after formatted extraction of int: 0
> gcount() after 2nd formatted extraction of int: 1
> gcount() after formatted extraction of string: 1
> gcount() after formatted extraction of char: 2
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (STDCXX-230) arithmetic extractors affect gcount()
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Sebor closed STDCXX-230.
-------------------------------
Resolution: Fixed
Fix Version/s: 4.2
Fixed by the referenced patch. Exercised by the 27.istream.fmat.arith.cpp test:
http://svn.apache.org/repos/asf/incubator/stdcxx/trunk/tests/iostream/27.istream.fmat.arith.cpp
> arithmetic extractors affect gcount()
> -------------------------------------
>
> Key: STDCXX-230
> URL: https://issues.apache.org/jira/browse/STDCXX-230
> Project: C++ Standard Library
> Issue Type: Bug
> Components: 27. Input/Output
> Affects Versions: 4.1.3, 4.1.2
> Environment: all
> Reporter: Martin Sebor
> Assigned To: Martin Sebor
> Fix For: 4.2
>
>
> Moved from the Rogue Wave bug tracking database:
> ****Created By: pedretti @ Apr 18, 2001 03:51:32 PM****
> basic_istream<>::gcount() is not ignoring characters consumed in formatted extraction operations.
> [ example program: ]
> #include <sstream>
> #include <iostream>
> using namespace std;
> int main () {
> stringstream ss;
> string s;
> int i;
> char c;
>
> ss << "12345 5678 hello world" << ends;
> cout << "gcount() before extraction : " << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after formatted extraction of int: "
> << ss.gcount() << endl;
> ss >> i;
> cout << "gcount() after 2nd formatted extraction of int: "
> << ss.gcount() << endl;
>
> ss >> s;
> cout << "gcount() after formatted extraction of string: " << ss.gcount() << endl;
>
> while (ss) {
> ss >> c;
> cout << "gcount() after formatted extraction of char: " << ss.gcount() << endl;
>
> }
> }
> [output:]
> gcount() before extraction : 0
> gcount() after formatted extraction of int: 0
> gcount() after 2nd formatted extraction of int: 1
> gcount() after formatted extraction of string: 1
> gcount() after formatted extraction of char: 2
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 1
> gcount() after formatted extraction of char: 0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.