[fpc-pascal] Primitive Record Wrappers
mazofeifer at gmail.com
Tue Mar 1 14:59:25 CET 2016
2016-03-01 10:07 GMT-03:00 Constantine Yannakopoulos <alfasud.ti at gmail.com>:
> The only solution I have found is to implement ALL operators for
> TNullableType<T> by defining a generic interface INullableOperatiors<T>
> that contains methods for all operators, then implement for each type by
> means of manual interface implementation and then delegate each class
> operator implementation to the corresponding implementation using RTTI of
> the generic parameter T like in Delphi's Generics.Defaults and
> IComparer<T>/IEqualityComparer<T>. This way the implementation of an
> operator not supported for a specific type (e.g. negation for strings) will
> raise an exception.
> It's a rather tedious task though and I abandoned it half way and I'm sure
> Sven would object to such an implementation as it involves manual
> interfaces. I can send you the unfinished Delphi unit via private email if
> you want.
Can you send me?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal