Compare displays with == (or some similar way)?

Hi everyone,

So in my code i’m doing:

const juce::Displays disp = juce::Desktop::getInstance().getDisplays();
const juce::Displays::Display pluginDisplay = disp.getDisplayForRect(pluginEditor.getScreenBounds());

which is giving me in the pluginDisplay variable the display in which the plugin is in. This is working great.

But later I am sweeping through all the displays on a for loop, and inside it I want to ask for each display in the array if it is the same as the pluginDisplay var I have declared earlier.
This is what I’m doing:

for (const auto d : disp.displays)
{
    // some code...
    bool hasPlugin = (&d == pluginDisplay);

    if (hasPlugin)
    // do stuff...
}

The problem is that hasPlugin boolean is returning false for every display.
So my question is, is there a way to compare displays like that?