Static on free functions

Dave P. dave287091 at gmail.com
Mon Dec 7 17:01:45 UTC 2020


Does `static` on a free function definition do anything?

I know the meaning of it in C, but I can’t find an equivalent 
definition  (or
any definition of it at all) when applied to free functions in 
the spec.

Are the two below any different or is it just for ease of porting 
from C?

static int foo(){
     return 3;
}

int foo(){
     return 3;
}


More information about the Digitalmars-d-learn mailing list