Thread overview
[BUG?] Private function in templates
Jan 08, 2004
J Anderson
May 19, 2004
Walter
May 20, 2004
J Anderson
January 08, 2004
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
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
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/