https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119259
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- operator== for std::vector is not constrained, so this is the expected behaviour. If you default your operator== then it will try to use equality for std::vector, which isn't constrained so is instantiated, which fails.