playing around with D

Daniel Keep daniel.keep.lists at gmail.com
Mon Mar 5 07:53:54 PST 2007



Don Clugston wrote:
> Carsten Scharfenberg wrote:
>> [snip]
>>
>> If I uncomment the alias befor TC everything works fine - why?
>> As TC is of type TupleContainer!() which has the member "append" (more
>> precisely: the named template "append" - I'm not sure if this acounts
>> as a member) I would presume this should work without the alias.
> 
> I would expect it to work, too. Don't be too surprised if you find
> template bugs -- the D template system is much more extensive than for
> C++, and new features have been added at a terrifying pace.

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

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/



More information about the Digitalmars-d mailing list