2016-03-01 10:07 GMT-03:00 Constantine Yannakopoulos <alfasud...@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?

Regards
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to