Debian Codegraph @

gcc/testsuite/g++.dg/other/gc6.C

raw
1 // PR c++/99831
2 // { dg-do compile { target c++20 } }
3 // { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0" }
4
5 template <int N> struct S {
6 constexpr S(const char (&str)[N]) : value{} { }
7 char value[N];
8 };
9 template <S> struct string {
10 constexpr bool operator==(const string &) const = default;
11 };
12 template <S L2> void operator+(string<L2>) {
13 char value[1];
14 S{value};
15 }
16 static_assert(string<"a">{} == string<"a">{});