Ready for review: new std.uni
H. S. Teoh
hsteoh at quickfur.ath.cx
Sat Jan 12 08:16:41 PST 2013
On Sat, Jan 12, 2013 at 12:20:46PM +0400, Dmitry Olshansky wrote:
> 12-Jan-2013 05:31, Walter Bright пишет:
> >On 1/11/2013 4:14 PM, H. S. Teoh wrote:
> >>Would an alias be appropriate in this case, so that we can put a
> >>concrete name to the function return type? Or is that an abuse of
> >>alias?
> >
> >Actually, that sounds like a good idea.
> >
>
> Except that it's created out of template parameters by wrapping them
> in a couple of template. So not, can't do.
[...]
I was going to suggest something like:
alias typeof(return) ConcreteName;
But then I realized it's impossible to use ConcreteName in the function
signature, which makes it pointless to have the alias since it won't
show up in the Ddoc. :-(
Although, maybe something like this *might* be possible (but it's sorta
getting to the point of being ridiculously complex just for the sake of
making ddoc display a single identifier):
template ConcreteName(A,B,C) {
alias ConcreteName = SomeTemplate!(A, OtherTemplate!B, ...);
}
ConcreteName!(A,B,C) func(A,B,C,D)(D args) {
ConcreteName!(A,B,C) retVal = ...;
return retVal;
}
T
--
Three out of two people have difficulties with fractions. -- Dirk Eddelbuettel
More information about the Digitalmars-d
mailing list