playing around with D
Carsten Scharfenberg
cathune_public at web.de
Mon Mar 5 08:33:40 PST 2007
Daniel Keep Wrote:
>
> I can't see why it *should* work.
>
> The way I've always thought about it is that templates are parameterised
> namespaces. Since (/*alias*/ TC) is a type parameter, it makes no sense
> to pass in a namespace, whereas (alias TC) *does* since it's an alias to
> an arbitrary symbol.
>
> I dunno; maybe it's just my way of rationalising it :P
Your definitely right! - But I pass a TupleContainer to UseAppend - and TupleContainer is declared to be a struct. So it IS a type!
But your remark provokes a new question; given the following declaration:
template UseAppend( T )
{
alias T UseAppend;
}
What is UseAppend? Is it a named template (or a parametrised namespace) or is it an alias to a real type? - In some way it is both...
More information about the Digitalmars-d
mailing list