<div dir="ltr">2016-03-01 10:07 GMT-03:00 Constantine Yannakopoulos <span dir="ltr"><<a href="mailto:alfasud.ti@gmail.com" target="_blank">alfasud.ti@gmail.com</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5"><div class="gmail_quote"><br></div></div></div><div><span style="font-family:arial,helvetica,sans-serif">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 </span><span style="font-family:arial,helvetica,sans-serif"><span style="font-family:arial,helvetica,sans-serif">like in Delphi's Generics.Defaults and IComparer<T>/IEqualityComparer<T></span>. This way the implementation of an operator not supported for a specific type (e.g. negation for strings) will raise an exception.<br><br>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.<br></span></div><br></div></div></blockquote><div><br><br></div><div>Can you send me?<br><br></div><div>Regards<br></div></div></div></div>