Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-11 08:56:02


THis is wonderful! Why don't you try it with VC? Is it unavailable to you?
If you send me a patch which enables some tests I'll be happy to try it for
you.

-Dave

----- Original Message -----
From: "John Maddock" <John_Maddock_at_[hidden]>
To: "boost" <boost_at_[hidden]>
Sent: Friday, January 11, 2002 7:15 AM
Subject: [boost] tuple fixes

> Jaakko, Dave,
>
> I've traced the problems with tuple and the Borland compiler to a single
> statement: it's the:
>
> using tuples::get;
>
> In tuple.hpp.
>
> I tried replacing this with a forwarding function:
>
> #ifndef __BORLANDC__
> using tuples::get;
> #else
> template<int N, class HT, class TT>
> inline typename tuples::access_traits<
> typename tuples::element<N, tuples::cons<HT, TT> >::type
> >::non_const_type
> get(tuples::cons<HT, TT>& c) {
> return tuples::get<N,HT,TT>(c);
> }
> // get function for const cons-lists, returns a const reference to
> // the element. If the element is a reference, returns the reference
> // as such (that is, can return a non-const reference)
> template<int N, class HT, class TT>
> inline typename tuples::access_traits<
> typename tuples::element<N, tuples::cons<HT, TT> >::type
> >::const_type
> get(const tuples::cons<HT, TT>& c) {
> return tuples::get<N,HT,TT>(c);
> }
> #endif
>
> and then replaced all occurances of "tuples::get" with "get" in the test
> program - everything checks out fine now with Borland, and the problems
> with tie_example.cpp and counting_iterator_test.cpp also go away. I
wonder
> if this forwarding function can also fix the problems that VC6 has with
the
> "using tuples::get" statement - it's signature would need changing, but
> that's not a big issue is it?
>
> Thoughts?
>
> - John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk