Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-19 19:10:01

----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>

> I was hoping yesterday to finalize changing the typelists code to submit
> to boost for review. I ran into a couple of problems and I said I would
> you about that:
> * What namespace should I put typelists in? The initial placement was: the
> Typelist class was in namespace Loki, and the afferent manipulation
> functions were in Loki::TL. I was thinking of putting typelist in boost,
> the rest in boost:tl. Would that be ok?

2 characters seems too short to me.

> * This brings the point of identity. At a point I plan to have boost (the
> Borg :o)) swallow all of Loki, but then there would be no Loki anymore.
> idea on how to address this identity crisis?

How interdependent are the various parts Loki? Does Loki have any other
identity than "these are Andrei's classes?"

> * Typelists use a type, NullType, which is in a header of its own, and
> serves as a terminator. Other parts of Loki use it. Is there another type
> somewhere in a general boost facility that can do that? If not, does
> null_type deserve a place in the boost namespace?

You might look at the Tuples Library, which has a null_type.

> * For the DerivedToFront algorithm, Loki uses SUPERSUBCLASS, which in turn
> uses the Conversion class. I "ported" Conversion to boost's format, but
> I remembered that a similar facility already exists in Boost. But there is
> no SUPERSUBCLASS in Boost, so by this I'd like to make a motion for
> introducing that macro in conversion_traits.hpp because I consider
> SUPERSUBCLASS an important abstraction. Also, I think the approach of
> a static dummy function instead of "static From _m_from;" in
> conversion_traits.hpp is more portable. (With today's standard, whether we
> like it or not, any "use" of a class static variable asks for it to be
> defined. The term "use" is not defined, which is a pity.)

Maybe you'd better explain SUPERSUBCLASS to those of us that don't know.
> * I understand that Aleksey Gurtovoy is working on a similar facility. I
> looked over his code and I didn't understand it, but then I didn't have
> time. Could anyone point me to some doc?

No doc yet, AFAIK, but please look at the test and example directories.
These have some simple use cases which should be enough to illustrate most

> If it offers the same functionality
> as typelist, I guess it would be best to merge the submissions.

Maybe so. Aleksey's meta-algorithms are supposed to be generic, so that
given any meta-sequence and the appropriate traits specializations, they
will "just work". His type_vector is a fixed-length typelist, with no

> * How about test code? What is the canonical way of adding test suites to
> parts of boost?

your header go in boost/boost if they are very general-purpose.
Domain-specific headers go in boost/boost/<domain>. Implementation details
in boost/boost/<domain>?/detail, in namespace boost::detail. Also, in the
libs subdirectory:

        src/ # sources
        doc/ # documentation
        test/ # tests
        example/ # examples


Boost list run by bdawes at, gregod at, cpdaniel at, john at