opCmp and unittest as a nested function

Alexandr Druzhinin drug2004 at bk.ru
Wed Apr 9 04:44:01 PDT 2014


09.04.2014 15:19, bearophile пишет:
> Alexandr Druzhinin:
>
>> I guess I should read how tepmlates work.
>
> No templates are involved in this code.
>
> Bye,
> bearophile
I mean that nested struct Point2D has additional pointer to frame and 
when compiler tries to instantiate template function 'tweet' it can't do 
it because in general it doesn't know about this additinal pointer to 
frame? And making it static I make it a general structure without 
additions and in this case compiler manages to instantiate 'tweet'?


More information about the Digitalmars-d-learn mailing list