This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Finally fix std::tuple
- From: Chris Jefferson <caj at cs dot york dot ac dot uk>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sat, 30 Oct 2004 21:06:45 +0100
- Subject: Finally fix std::tuple
Hopefully this is the final patch to tuple (at least until the results
of last week's meetings come out). Yet another invalid symbol (_I this
time..)
Sorry,
Chris
2004-10-30 Chris Jefferson <chris@bubblescope.net>
PR libstdc++/18159
* include/tr1/tuple (get(pair)): Change occurances of _I to __i.
(get(const pair)): Likewise.
Index: tuple
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/include/tr1/tuple,v
retrieving revision 1.2
diff -p -c -3 -r1.2 tuple
*** tuple 28 Oct 2004 21:18:56 -0000 1.2
--- tuple 30 Oct 2004 19:03:43 -0000
*************** namespace tr1
*** 1545,1559 ****
struct tuple_element<1, std::pair<_Tp1, _Tp2> >
{ typedef _Tp2 type; };
! template<int _I, class _Tp1, class _Tp2>
! typename tuple_element<_I, tuple<_Tp1, _Tp2> >::type
get(pair<_Tp1, _Tp2>& __in)
! { return get<_I>(tie(__in.first, __in.second)); }
! template<int _I, class _Tp1, class _Tp2>
! typename tuple_element<_I, tuple<_Tp1, _Tp2> >::type
get(const pair<_Tp1, _Tp2>& __in)
! { return get<_I>(tie(__in.first, __in.second)); }
}
}
--- 1545,1559 ----
struct tuple_element<1, std::pair<_Tp1, _Tp2> >
{ typedef _Tp2 type; };
! template<int __i, class _Tp1, class _Tp2>
! typename tuple_element<__i, tuple<_Tp1, _Tp2> >::type
get(pair<_Tp1, _Tp2>& __in)
! { return get<__i>(tie(__in.first, __in.second)); }
! template<int __i, class _Tp1, class _Tp2>
! typename tuple_element<__i, tuple<_Tp1, _Tp2> >::type
get(const pair<_Tp1, _Tp2>& __in)
! { return get<__i>(tie(__in.first, __in.second)); }
}
}