Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-08-23 10:02:55


Having now used the prerelease version of tuples extensively (and with GREAT
satisfaction!), I have some new suggestions.

I realize that I suggested that tuples go directly in the boost namespace,
but I think I'm going to reverse my position, at least in part. I wasn't
looking carefully at everything in the library when I suggested that it go
directly in namespace boost. For example, I am concerned about functions
such as tie, get, and set. It seems to me that those names at least should
go in a nested namespace.

Also, There are a few modifications I need in order for tuples to be useful
to me. Since I am writing metaprograms using tuples (in particular, building
tuples from type lists, etc.), I need to be able to get at the underlying
cons cells. I also need the following simple constructor in the cons cell
which isn't currently supplied:

  cons(head_type const& x, tail_type const& y) : head(x), tail(y) {}

Finally, the file boost/tuple/detail/tuple_basic.hpp seems to contain some
very strange line endings. I could clean them up, but I would rather defer
to the authors.

Thanks,
Dave

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, August 22, 2001 8:31 PM
Subject: Re: [boost] utilities & tuples

>
> Hmm, perhaps tie() should just be removed from utility? Though I suppose
> this means updating #includes that currently point to utility... or should
> utility include tuple?
>
> On Wed, 22 Aug 2001, Kresimir Fresl wrote:
>
> fresl>
> fresl> Hi,
> fresl>
> fresl> It seems that there is a name clash between tie() from
`utility.hpp'
> fresl> and two argument tie() from new tuple library (in boost 1.24.0).
> fresl> g++ (v3.0) complains:
> fresl>
> fresl> In file included from
/usr/local/include/boost/iterator_adaptors.hpp:101,
> fresl> from cloud.h:8, // my file
> fresl> from tws.cc:14: // my file
> fresl> /usr/local/include/boost/utility.hpp:114: new declaration
`template<class A,
> fresl> class B> boost::tied<A, B> boost::tie(A&, B&)'
> fresl> /usr/local/include/boost/tuple/detail/tuple_basic.hpp:644:
ambiguates old
> fresl> declaration `template<class T1, class T2> boost::tuple<T1&, T2&,
> fresl> boost::null_type, boost::null_type, boost::null_type,
boost::null_type,
> fresl> boost::null_type, boost::null_type, boost::null_type,
boost::null_type>
> fresl> boost::tie(T1&, T2&)'
> fresl>
> fresl> (Older versions of tuples, before inclusion in oficial boost
release, were in
> fresl> a nested namespace boost::tuples.)
> fresl>
> fresl>
> fresl> fres
> fresl>
> fresl>
> fresl> PS. There may be some other problems with tuple library:
> fresl>
> fresl> As a quick and dirty fix I renamed tuple tie() functions to
> fresl> tie_tuple(). g++ now compiles my program (and it works
> fresl> as expected ;0), but Comeau C++ 4.2.45.2 says:
> fresl>
> fresl> "/usr/local/include/boost/tuple/detail/tuple_basic.hpp", line 552:
error:
> fresl> template argument list must match the parameter list
> fresl> boost::detail::tuples::make_tuple_mapper<T0>::type
> fresl> ^
> fresl>
> fresl> "/usr/local/include/boost/tuple/detail/tuple_basic.hpp", line 702:
error:
> fresl> expected a ";"
> fresl> } // end of namespace boost
> fresl> ^
> fresl>
> fresl> Comeau compiles older version of tuples (dated 2001-05-29).
> fresl>
> fresl> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
> fresl>
> fresl> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> fresl>
> fresl>
> fresl>
>
> ----------------------------------------------------------------------
> Jeremy Siek http://php.indiana.edu/~jsiek/
> Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
> C++ Booster (http://www.boost.org) office phone: (812) 855-9761
> ----------------------------------------------------------------------
>
>
>
> Info: http://www.boost.org Unsubscribe:
<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