https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103563
m.cencora at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.cencora at gmail dot com --- Comment #3 from m.cencora at gmail dot com --- This is a known issue with operators in C++ in general. That's why coding guidelines suggest that operators should be declared as hidden friends (to prevent unexpected implicit conversions). In your scenario you cannot make it a hidden friend, so constraint it with a concept or SFINAE: https://godbolt.org/z/de869vW6h