epezent / implot

Immediate Mode Plotting
MIT License
4.55k stars 503 forks source link

Make ImPlotPoint equal compatible #470

Closed volard closed 1 year ago

volard commented 1 year ago

Problem

Once I wanted to find_erase() from ImVector<ImPlotPoint> but then I got this:

Severity Code Description
Error C2676 binary '==': 'T' does not define this operator or a conversion to a type acceptable to the predefined

Solution

Implement bool operator== by comparing equality of coordinates values


There are probably a lot more improvements ImPlotPoint needs to have, but I found just this use-case so far (implot is the great library, thank you)