Aliasing of template results - alias bar = foo
Nick Treleaven
nospam at example.net
Mon Jan 23 09:04:38 PST 2012
On 22/01/2012 18:33, Andrej Mitrovic wrote:
> A while ago there was a suggestion by Andrei to incorporate this sort of syntax:
>
> template ElementType(T : T[])
> {
> alias ElementType = T;
> }
>
> struct Foo(T)
> {
> alias Type = T;
> }
>
> I think people agreed it was a nice syntax, but I don't know if anyone
> tried to implement it.
I think this is not really relevant to the OP question about changing
eponymous template syntax though.
By coincidence, I implemented 'alias bar = foo;' syntax yesterday in my
local copy - see attached diff.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alias-assign.diff
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120123/1c11319a/attachment.ksh>
More information about the Digitalmars-d
mailing list