Type Qualifiers and Wild Cards

so so at so.so
Tue Nov 8 09:02:40 PST 2011


On Tue, 08 Nov 2011 18:56:59 +0200, Gor Gyolchanyan  
<gor.f.gyolchanyan at gmail.com> wrote:

> Unless you write a template constraint, this will force you to use the
> same type, instead of the same storage class.
>
> On Tue, Nov 8, 2011 at 8:42 PM, so <so at so.so> wrote:
>> On Tue, 08 Nov 2011 16:39:35 +0200, so <so at so.so> wrote:
>>
>>> auto fun(return(type) a, ...)
>>> return(T) fun(return(S) a, ...)
>>
>> Damn, nobody likes it, and i was expecting at least a nobel prize on  
>> math.
>>

return(T) fun(return(S) a, ...)

Functions just like inout right now, and with:

auto fun(return(type) a, ...)

I meant to suggest if not said otherwise (as in the case above) we can  
just go return what it was passed.
(I am not sure, probably inout already does this too)


More information about the Digitalmars-d mailing list