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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Arthur O'Dwyer from comment #6)
> What do you mean "if an exception is thrown"? If we call std::copy from
> here, then it's because we are taking the memmove path.

The whole point of the bug is the conditions for which we call std::copy. My
comment is discussing when we can and can't call it. You seem to be assuming
that we've already got the conditions correct and therefore the conditions are
already correct. That's a tautology.

If we get the conditions wrong, then "it's because we are taking the memmove
path" might be false. We might end up calling a specialization of std::copy
that decides not to memmove.

So when discussing the conditions when it's valid to call std::copy, it's worth
enumerating the requirements on std::uninitialized_copy and how they differ
from std::copy. 

But as I said right after the part you quoted, trivially copyable implies
trivially destructible, so the trivially destructible requirement is trivially
met.

Reply via email to