[fpc-pascal] Element type of set at compile time
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun May 15 16:40:51 CEST 2022
On Sun, 15 May 2022 09:03:58 +0200 (CEST)
Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org>
wrote:
> On Sun, 15 May 2022, Hairy Pixels via fpc-pascal wrote:
>
> > Is there a compiler intrinsic to get the element type of a set at
> > compile time? So if you have “set of T” it should return T.
>
> I don't think you can make such an intrinsic.
> This type does not always exist, since you can define
>
> Type
> TMySet = set of (one,two,three);
>
> The element type does not exist as a separate type.
The RTTI supports it, so it always exists.
Mattias
More information about the fpc-pascal
mailing list