On Tue, 3 Sep 2019 12:38:49 +0200 Mattias Gaertner via fpc-devel <fpc-devel@lists.freepascal.org> wrote:
> On Tue, 3 Sep 2019 12:15:50 +0200 > Marco van de Voort <f...@pascalprogramming.org> wrote: > > > I'm trying to let an iterator implement the enumerator pattern and > > return itself, but for that I need to use the type of the generic: > > > > generic THashmapIterator<TKey, TValue, T, TTable>=class > > public > > type PValue=^TValue; > > > > // make type alias > > > > TIteratorType = generic THashmapIterator<TKey, > > TValue, T, TTable>; > > 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>"; Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel