https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112544
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> --- Reduced: template<class T> struct tuple { tuple& operator=(const tuple&) = default; T t; }; void f(int x) { auto closure = [x] { }; using type = decltype(closure); static_assert(__is_trivially_copyable(type)); // #1 tuple<type> t = {closure}; // forces type::operator= to get synthesized // (and declared as deleted) static_assert(__is_trivially_copyable(type)); // #2 } Currently static_assert #1 succeeds and #2 fails seemingly because our implementation of __is_trivially_copyable is sensitive to whether the relevant special member functions have yet been synthesized.