This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2657: ostream and namespace declarations conflict
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2657: ostream and namespace declarations conflict
- From: lakshman at nssl dot noaa dot gov
- Date: 26 Apr 2001 20:18:59 -0000
- Reply-To: lakshman at nssl dot noaa dot gov
>Number: 2657
>Category: c++
>Synopsis: ostream and namespace declarations conflict
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 26 13:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Lakshman
>Release: gcc2.95.2 on Solaris 7, gcc2.95.3 on Linux 2.4
>Organization:
>Environment:
Solaris, Linux
>Description:
If there is an ostream<< declaration in a namespace,
ostream << std::string doesn't get recognized.
>How-To-Repeat:
compile the file with the last line
uncommented.
>Fix:
currently doing bar.c_str() everywhere this
happens.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKbmFtZXNwYWNlIGZvb2Jhcgp7
CiAgdGVtcGxhdGU8Y2xhc3MgVD4KICBjbGFzcyBGb29CYXIKICB7CiAgcHVibGljOgogICAgZnJp
ZW5kIHN0ZDo6b3N0cmVhbSYgb3BlcmF0b3IgPDwgKHN0ZDo6b3N0cmVhbSYgb3MsCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRm9vQmFyJiBmKQogICAgICB7CiAg
ICAgICAgb3MgPDwgZi5hOwogICAgICAgIHJldHVybiBvczsKICAgICAgfQogICAgRm9vQmFyKFQg
aSA9IFQoKSkgOiBhKGkpCiAgICAgIHsKICAgICAgfQogIHByaXZhdGU6CiAgICBUIGE7CiAgfQog
IDsKfQoKaW50IG1haW4oKQp7CiAgc3RkOjpzdHJpbmcgYmFyKCIzIik7CgogIC8vIG9rYXkKICBz
dGQ6OmNvdXQgPDwgZm9vYmFyOjpGb29CYXI8aW50PigxKSA8PCAiIGlzIGEgbmFtZXNwYWNlIG9i
amVjdC5cbiI7CgogIC8vIHRoaXMgbGluZSBjYXVzZXMgYW4gZXJyb3IgaWYgRm9vQmFyIGlzIGRl
ZmluZWQgaW4gYSBuYW1lc3BhY2UKICAvL3N0ZDo6Y291dCA8PCBiYXIgPDwgIiBpcyBhIHN0cmlu
Zy5cbiI7Cn0K