On Tue, Dec 5, 2023 at 4:03 PM Ryan Nicholl via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
I want to raise my personal concern around the proposed solution to Issue2157.

I do not believe that std::array<T, 0> {{}}; should be required to be valid syntax. This prevents std::array<T, 0> from being implemented as an empty struct. It is also just logically inconsistent with an array that contains no elements. I believe this eliminates empty base class optimization and presents several other issues that I believe diverge from the 0 overhead principle. For this reason I think the solution ought to be reconsidered.

Since `std::array<int, 3> {{1, 2, 3}}` is valid, it is actually consistent for `std::array<T, 0> {{}}` to be valid too.

Also, if the single element of `std::array<T, 0>` is an empty base class or a data member declared with `[[no_unique_address]]`, then `std::array<T, 0>` can itself be an empty base class.
Std-Proposals mailing list

Brian Bi