Hi all
I am trying to implement Option<T> type in FPC.
type
generic TOption<T> = record
case IsSome:boolean of
true: ( some: T );
false: ();
end;
However fpc just emits errors:
Error: Type parameters may require initialization/finalization - cannot be used
in variant records
Could anybody suggest some sane workaround for the problem?
-- Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal