template ref parameter

Jack Applegame japplegame at gmail.com
Wed Nov 21 03:57:57 PST 2012


But sometimes ref becomes a part of type. For example "void 
delegate(ref int)" and "void delegate(int)" are different types. 
Is it possible to cast from one to another safely? For example:

void foo(ref int);
void function(int) fp;
fp = cast(typeof(fp)) foo; /// is it safe???


More information about the Digitalmars-d-learn mailing list