You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Anton Pevtsov (JIRA)" <ji...@apache.org> on 2006/06/21 12:52:29 UTC
[jira] Created: (STDCXX-205) lib.string.io operator << calls width
(0) in any case regardless of the sentry truth
lib.string.io operator << calls width (0) in any case regardless of the sentry truth
------------------------------------------------------------------------------------
Key: STDCXX-205
URL: http://issues.apache.org/jira/browse/STDCXX-205
Project: C++ Standard Library
Type: Bug
Components: 21. Strings
Versions: 4.1.3
Environment: all
Reporter: Anton Pevtsov
Priority: Minor
The following test fails:
#include <iostream>
#include <sstream>
#include <string>
#include <cassert>
int main(int argc, char* argv[])
{
std::string str ("abcdefghijk");
std::ostringstream os;
const std::streamsize width = 2;
os.width (width);
os.clear (std::ios_base::failbit);
os << str;
assert (os.width () == width);
return 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] Resolved: (STDCXX-205) std::operator<<(ostream, string)
calls width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
Martin Sebor resolved STDCXX-205:
---------------------------------
Fix Version: 4.2
Resolution: Fixed
Fixed by the referenced patch. Tested in http://svn.apache.org/repos/asf/incubator/stdcxx/trunk/tests/strings/21.string.io.cpp.
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.2
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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-205) std::operator<<(ostream, string) calls
width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
Martin Sebor updated STDCXX-205:
--------------------------------
Summary: std::operator<<(ostream, string) calls width(0) regardless of sentry (was: lib.string.io operator << calls width (0) in any case regardless of the sentry object truth)
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Priority: Minor
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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] Closed: (STDCXX-205) std::operator<<(ostream, string) calls
width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
Martin Sebor closed STDCXX-205:
-------------------------------
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
> Fix For: 4.2
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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] Assigned: (STDCXX-205) std::operator<<(ostream, string)
calls width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
Martin Sebor reassigned STDCXX-205:
-----------------------------------
Assign To: Martin Sebor
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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] Commented: (STDCXX-205) std::operator<<(ostream, string)
calls width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=comments#action_12420401 ]
Martin Sebor commented on STDCXX-205:
-------------------------------------
As pointed in the post linked above, lib.string.io, p5, requires that width(0) be called after the characters have been [presumably successfully] inserted into the stream's buffer:
-5- Effects: Begins by constructing a sentry object k as if k were constructed by typename basic_ostream<charT, traits>::sentry k (os ). If bool(k) is true, determines padding as described in 22.2.2.2.2, then inserts the resulting sequence of characters seq as if by calling os.rdbuf()->sputn(seq , n), where n is the
larger of os.width() and str.size(); then calls os .width(0). If the call to sputn fails, calls os .setstate(ios_base::failbit).
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Assignee: Martin Sebor
> Priority: Minor
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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-205) lib.string.io operator << calls width
(0) in any case regardless of the sentry object truth
Posted by "Anton Pevtsov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=all ]
Anton Pevtsov updated STDCXX-205:
---------------------------------
Summary: lib.string.io operator << calls width (0) in any case regardless of the sentry object truth (was: lib.string.io operator << calls width (0) in any case regardless of the sentry truth)
corrected the summary string
> lib.string.io operator << calls width (0) in any case regardless of the sentry object truth
> -------------------------------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Priority: Minor
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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] Commented: (STDCXX-205) std::operator<<(ostream, string)
calls width(0) regardless of sentry
Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/STDCXX-205?page=comments#action_12420399 ]
Martin Sebor commented on STDCXX-205:
-------------------------------------
See the thread starting at: http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200606.mbox/%3c4498144C.9050303@moscow.vdiweb.com%3e
> std::operator<<(ostream, string) calls width(0) regardless of sentry
> --------------------------------------------------------------------
>
> Key: STDCXX-205
> URL: http://issues.apache.org/jira/browse/STDCXX-205
> Project: C++ Standard Library
> Type: Bug
> Components: 21. Strings
> Versions: 4.1.3
> Environment: all
> Reporter: Anton Pevtsov
> Priority: Minor
>
> The following test fails:
> #include <iostream>
> #include <sstream>
> #include <string>
> #include <cassert>
> int main(int argc, char* argv[])
> {
> std::string str ("abcdefghijk");
> std::ostringstream os;
> const std::streamsize width = 2;
> os.width (width);
> os.clear (std::ios_base::failbit);
> os << str;
> assert (os.width () == width);
> return 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