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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Giuseppe D'Angelo from comment #0)
> It's also worth noting that the static_assert is into a if constexpr(
> __memcpyable<_Iter, _Out>::__value) branch. memcpyable basically means
> trivially copyable (except for pointers to volatile), however trivially
> copyable does NOT imply is_copy_assignable (because it just checks that
> eligible copy assignments are trivial, not that they work from a `const T`).

N.B. That's not quite accurate, which is why we needed the check in std::copy.

A type with deleted assignment operators can also be trivially copyable.

Reply via email to