Template instantiation syntax
Sergey Gromov
snake.scaly at gmail.com
Sat Oct 11 06:18:48 PDT 2008
Fri, 10 Oct 2008 23:22:22 -0700,
Walter Bright wrote:
> Sergey Gromov wrote:
> > so that even a!b!c!(x,y) works as a!(b!(c!(x,y))), but a!(b)!(c) is not
> > accepted.
>
> I don't think it's a good idea to say that a!(b)!(c) is never allowed.
> It intuitively means that a!(b) is aliased to another template.
Ok, then I think it's a matter of specifying precedence. So that a!b!c
is always a!(b!(c)) but if you want to use a!b as an alias to another
one-argument template then you must write a!(b)!c. It seems like a rare
use case so it's Ok to require a bit more typing.
More information about the Digitalmars-d
mailing list