Boost logo

Boost :

From: jaakko.jarvi_at_[hidden]
Date: 2001-08-24 03:25:33


--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
> 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.

Dave's previous comments sure influenced in the decision to drop the
subnamespace :) But ok, let's bring the issue up again.
Before jumping into moving the stuff back to a subnamespace, I'd be
happy if we could reach a (new) firm conclusion.

All interested, please read the 'About namespaces' section in the
tuple design decisions rationale for some
background.

http://www.boost.org/libs/tuple/doc/design_decisions_rationale.html

Also, below is a list of names, that the library currently adds to
boost namespace:

null_type
cons
tuple

tuple_element
tuple_access_traits
tuple_length

ignore

get(cons<HT, TT>&)
get(const cons<HT, TT>&)

make_tuple() // 0, 1, 2, ... 10 argument versions
tie() // 1, 2, ... 10 argument versions

operator<< and operator>> for cons lists

operator<< and operator>> for tuple_manipulators
set_open(charT), set_close(charT), set_delimiter(charT)

reference_wrapper
ref
cref

operator> // these take two cons lists as arguments
operator<
operator==
operator!=
operator<=
operator>=

-------------------------

So if tuples go back to a subnamespace, the questions are:

1. What is the name of the namespace (tuples or tuple?)
2. Will the most common names remain in boost namespace?
2.1. If yes, which, and are they defined in boost namespace
or defined in boost::tuple(s) namespace and lifted to boost with
using declarations.

-----------------
Other issues:
> tuples from type lists, etc.), I need to be able to get at the
underlying
> cons cells.
Tuple has a typedef 'inherited' which gives the underlying cons list
type, e.g.:
tuple<A, B, C>::inherited equals cons<A, cons<B, cons<C,null_type> > >

> 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) {}
Ok, this can be added.

> Finally, the file boost/tuple/detail/tuple_basic.hpp seems to
contain some
> very strange line endings.
Cleaned.

Cheers, Jaakko


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