UDA and ReturnType!(__traits...) doesn't work

filcuc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 3 10:21:58 PDT 2015


Hi all,
i'm working in the generation of the code but i'm failing in 
extracting a function return type when invoking the 
ReturnType!(T) type trait and mixing it with __traits(getMember) 
function.
Can anyone help me? or explaining what is happenning?
i've created a gist here: 
https://gist.github.com/filcuc/14c3a6cac89beb69cccd

The error message is the following:

main.d-mixin-58(58): Error: template instance 
main.Person.ReturnType!(name) does not match template declaration 
ReturnType(func...) if (func.length == 1 && isCallable!func)
main.d-mixin-58(58): Error: template instance 
std.traits.ReturnType!(Monitor) does not match template 
declaration ReturnType(func...) if (func.length == 1 && 
isCallable!func)
main.d(73): Error: template instance main.IterateUDA!(Person) 
error instantiating


More information about the Digitalmars-d-learn mailing list