[fpc-devel] objfpc generics how to generate self type reference ?

Marco van de Voort fpc at pascalprogramming.org
Tue Sep 3 13:17:08 CEST 2019


Op 2019-09-03 om 13:11 schreef Mattias Gaertner via fpc-devel:
>
>> Inside the generic the templates are normal types:
>>
>>        TIteratorType = specialize THashmapIterator<TKey, TValue, T,
>> TTable>;
> Btw, mode objfpc allows shortcut THashmapIterator without <> as
> shortcut for "specialize THashmapIterator<TKey, TValue, T, TTable>";

It works, thanks. I'm sure I tried it, but probably some editing mishap 
obscured the result.

This is better than reworking to nested classes because it is backwards 
compat. (though gvector does use nested class as iterator)



More information about the fpc-devel mailing list