https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109568

--- Comment #3 from zed.three at gmail dot com ---
Ah, I see what you mean. Putting in a guard clause

    if (!var_ref) return false;

does indeed silence the warning.

But should the warning not be on the `var_ref->empty()` call itself then,
instead of inside `shared_ptr::operator==`? I guess that it's ultimately
triggered by the implicit `this` in accessing `_M_ptr`, but it would be more
obvious it it were bubbled up to `var_ref`

Reply via email to