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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #0)
> We could either stop using std::_Destroy(first, cur) in the uninitialized
> algos (no thanks), or make std::_Destroy(first, cur) handle arrays, or make
> std::_Destroy(*first) handle arrays.
> 
> The latter would be consistent with std::destroy_at, and would mean that
> std::_Destroy_n(first, n) would also work for arrays. But to make the code
> above (and all similar cases?) work it's sufficient to handle it in
> std::_Destroy(first, last). All the uninitialized algos use that.

Hmm, but std::destroy(first, last) and std::destroy_n(first, n) in C++17 do not
support arrays, and we implement them by calling std::_Destroy(first, last) and
std::_Destroy_n(first, n) respectively. So if _Destroy is "fixed" to handle
arrays, then it would affect std::destroy.

Reply via email to