This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/23875] New: operator<<(short) should not call operator<<(long), etc.
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2005 00:51:55 -0000
- Subject: [Bug libstdc++/23875] New: operator<<(short) should not call operator<<(long), etc.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
DR117 is not implemented in the same way of DR118: operator<<(short) calls
operator<<(long), operator<<(unsigned short) calls operator<<(unsigned long),
operator<<(int) calls operator<<(long), etc... I think the way we implemented
DR118 is better (i.e., following the letter of the resolution, without calling
other inserters/extractors), even if it adds more code for now (*), because
allows the user to specialize, say, only operator<<(long), without affecting
the other inserters.
(*) Then, another project would clean-up and commonize the code in those bodies
to, say, _M_insert and _M_extract.
--
Summary: operator<<(short) should not call operator<<(long), etc.
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcarlini at suse dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23875