-
Notifications
You must be signed in to change notification settings - Fork 43
Equality
Cauê Waneck edited this page Apr 2, 2018
·
6 revisions
Haxe's ==
operator only compares pointer (physical) equality. So its behavior might be unexpected in some cases where C++'s own equals operator behavior is expected.
Non-UObjects automatically implement an extra equals
function. It uses C++'s operator ==
if available.
Sometimes you may want to make a type not implement this extra function even if it is available - you can add the @:noEquals
metadata to the pre-baked extern
If you're using a type that was generated by the automatic externs and that includes a
@:noEquals
meta but you're sure theoperator ==
is accessible outside the DLL scope, you can add@:hasEquals
metadata in your_Extra
class definition