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

--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Also, I wonder what the final value of copy_counter should be in the below
testcase (assuming it's valid):

static int copy_counter;

struct S {
  S() = default;
  S(const S&) { ++copy_counter; }
};

template <typename... Ts>
void foo(Ts...) { }

template <typename... Ts>
void bar(Ts... x) {
  foo([x...] { return x; }...);
}

int main() {
  bar(S{}, S{}, S{});
}

According to Clang it's 9, FWIW.

Reply via email to