C++ Logo

std-proposals

Advanced search

[std-proposals] In re: Issue2157

From: Ryan Nicholl <rnicholl_at_[hidden]>
Date: Tue, 5 Dec 2023 13:03:14 -0800
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.

Received on 2023-12-05 21:03:28