determine parameter storage class in D 2.0

Christian Kamm kamm.incasoftware at shift-at-left-and-remove-this.de
Sun Feb 3 22:20:47 PST 2008


> Christian Kamm wrote:
>> Anyway, I think it's odd that for
>> 
>> void foo(ref int i) {}
>> void foo2(ParameterTypeTuple!(foo)) {}
>> 
>> ParameterTypeTuple!(foo) is (ref int) and
>> ParameterTypeTuple!(foo2) is (int).

Robert Fraser wrote:
> Looks like a bug

I'm not sure. After all it is a type tuple - and ref int isn't a distinct
type from int. Also

void foo(ref int i) {}
ParameterTypeTuple!(foo).stringof == "(ref int)"
ParameterTypeTuple!(foo)[0].stringof == "int".

A while back Andrei found it problematic that there is no way to write a
function template ident(F) such that foo and ident!(foo) behave exactly the
same. It might be the beginnings of a not-yet-done storage class
manipulation feature. 


More information about the Digitalmars-d-learn mailing list