Boost logo

Boost :

From: Emily Winch (emily_at_[hidden])
Date: 2002-08-10 08:02:03

Douglas Gregor wrote:
> On Saturday 10 August 2002 01:45 am, Andrei Alexandrescu wrote:

[ snipped ]

> At one point you distilled your question down to "why do we need more than one
> type of sequence?". I'm wondering if you considered Burton et al's use of
> typevectors (heterogeneous value vectors, if you will) to be a useful 'other'
> sequence type? (I described their use of the typevectors in a different
> thread).

That sounds like a killer argument (and I'd love to know why it didn't
occur to me before in this context). Treating a value sequence as a type
sequence is definitely definitely a Useful Thing To Do. For printing out
the types to check that they're the ones you expected: for asserting
that all the types conform to the expected interface: for calculating
the length of the sequence.

The alternative would be a value sequence that exposes its type sequence
for people to mess with: but it just seems so _neat_ that a value
sequence should act like a type sequence if you apply type-sequence
algorithms to it.

I suppose one could argue for just having one sequence, a value
sequence, and using it as a type sequence by not instantiating it: but
that sounds like a nasty idea. Not least because it is simply not
intuitive that instantiating a type_sequence<big-type, other-big-type>
should drag two big objects into existence.


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