Hi i am looking how to perform this action with traits. Below
some code to show what it fail


Regards


---- CODE
import std.traits       : isDelegate, isSomeFunction,
MemberFunctionsTuple, ParameterIdentifierTuple;


struct section( alias start, alias end )
{
     alias checkStart = start;
     alias checkEnd = end;
}

void main()
{
     alias tmp = bool delegate( string ); // what i would like to
get
     alias s = section!( (word) => word =="a" , (word) => word ==
"b" );
     pragma( msg, isSomeFunction!(s.checkStart) );           //
false
     pragma( msg, isDelegate!(s.checkStart) );               //
false
     pragma( msg, __traits(identifier, s.checkStart) );      //
__lambda1
     pragma( msg, ParameterIdentifierTuple!(s.checkStart) ); //
error
     pragma( msg, MemberFunctionsTuple!( s.checkStart ) );   //
error
}

Reply via email to