Boost logo

Boost :

From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2002-08-07 18:27:06


> Do you have a reference for a "typle?" First I've heard of it.
> Sounds like a tuple of types -- is that right?

'typle' was just a typo, sorry. Should be 'tuple'

>
> > But we were questioning whether having a variable number of _named_
> > template parameters is useful, I think not.
> > There you pretty much have to know the names of your features you may
> > expect the user to provide, and then you know the maximum number
> > of template parameters too.
>

> Yes, of course you have to know the names -- but only the
> _implementation_ need know those names, right? Hence my
> diversion into the pimpl analogy.

Ok, I think I understand what you mean.

Say we have our car template, which has a fixed set of features.
In the case it's instantiated directly from client code, the programmer
does know the number of features too.
But it might get instantiated indirectly from some generic function, which
doesn't necessarily know anything about the car template, (it could maybe
be just a template template parameter).

I don't know is this something to worry about and is it worth wrapping
the arguments into a typelist.
I like the solution in the sandbox, since it is straightforward and
simple, and gives a fairly nice syntax.

Cheers, Jaakko


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