Thread overview | |||||
---|---|---|---|---|---|
|
January 08, 2004 [BUG?] Private function in templates | ||||
---|---|---|---|---|
| ||||
template privateTest(T) { private void func() { } } alias privateTest!(int) p; int main( char [] [] args ) { p.func(); //Shouldn't this cause a compile error? return 1; } Anderson |
May 19, 2004 Re: [BUG?] Private function in templates | ||||
---|---|---|---|---|
| ||||
Posted in reply to J Anderson | private, outside of a class, means private to the module, not private to the template. "J Anderson" <REMOVEanderson@badmama.com.au> wrote in message news:btknau$12a1$1@digitaldaemon.com... > > template privateTest(T) > { > private void func() > { > > } > > } > > alias privateTest!(int) p; > > int main( char [] [] args ) > { > p.func(); //Shouldn't this cause a compile error? > > return 1; > } > > Anderson > |
May 20, 2004 Re: [BUG?] Private function in templates | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote: >private, outside of a class, means private to the module, not private to the >template. > > > Dam you must be digging through some old messages. I know this now <g>. Not that I don't appreciated it. I guess it will help anyone else though. >"J Anderson" <REMOVEanderson@badmama.com.au> wrote in message >news:btknau$12a1$1@digitaldaemon.com... > > >>template privateTest(T) >>{ >> private void func() >> { >> >> } >> >>} >> >>alias privateTest!(int) p; >> >>int main( char [] [] args ) >>{ >> p.func(); //Shouldn't this cause a compile error? >> >> return 1; >>} >> >>Anderson >> >> >> > > > > -- -Anderson: http://badmama.com.au/~anderson/ |
Copyright © 1999-2021 by the D Language Foundation