Use custom function with TArray.Contain

I want to override operator== and define a static function in header:

UFUNCTION(BlueprintCallable, BlueprintPure)
static bool operator==(const AItem* ItemOne, const AItem* ItemTwo) const;

but it occur an error:

error : Bad function definition

how can I fix it?

as far as I can tell there’s no such thing as a static operator

yes, I change my code to:

//No UFUNCTION here
bool operator==(const AItem* anotherItem) const;

and it works :smiley: