This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/19535] New: Wrong return types for __pair_get<1>
- From: "peturr02 at ru dot is" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2005 17:05:05 -0000
- Subject: [Bug libstdc++/19535] New: Wrong return types for __pair_get<1>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In tr1/utility:
template<>
struct __pair_get<1>
{
template<typename _Tp1, typename _Tp2>
static _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair)
{ return __pair.second; }
template<typename _Tp1, typename _Tp2>
static const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair)
{ return __pair.second; }
};
These functions should return (const) _Tp2&, since the type of __pair.second
is _Tp2.
--
Summary: Wrong return types for __pair_get<1>
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peturr02 at ru dot is
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19535