[libcxx-commits] [libcxx] Improvements to std::array<T, 0>. (PR #74657)
Ryan Nicholl via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 7 09:29:25 PST 2023
rnicholl-google wrote:
> After looking at this PR, I would suggest that we go with #74667 which fixes the bug without any ABI change, and without requiring non-conforming API changes.
>
> We can then either drop this or transform this patch into a change that makes `std::array<T, 0>` be 1 byte in all cases -- although the benefit of that in isolation is limited.
I actually don't think anything in the spec requires array<T const,0> to be non-copy assignable. Since the type itself is non const, you'd expect it would be copyable, unless the aggregate is un-copyable?. But the standard isn't very clear. I can separate this out into two separate commits. However, I am sending some emails to the std-proposals mailing list to see if we can get clarity around if std::array<T const, 0> should be copyable.
https://github.com/llvm/llvm-project/pull/74657
More information about the libcxx-commits
mailing list