https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99831
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Even shorter: // PR c++/99831 template <int N> struct S { constexpr S(const char (&str)[N]) : value{} { } char value[N]; }; template <S> struct string { constexpr bool operator==(const string &) const = default; }; template <S L2> void operator+(string<L2>) { char value[1]; S{value}; } static_assert(string<"a">{} == string<"a">{});