Skip to content
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.

Structural Equality

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 the operator == is accessible outside the DLL scope, you can add @:hasEquals metadata in your _Extra class definition