A new WG21 paper is available. A copy is linked below, and will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N4025
by Jeff Snyder and Richard Smith
During the Chicago meeting, several options were discussed for Arrays of Runtime Bound. These alternatives were summarised by Bjarne Stroustrup in N3810 . One of the alternatives discussed, dubbed Array Constructors, was to introduce a core language feature that would allow types such as
bs_arrayto be written without special compiler support.
At the Issaquah meeting, J. Daniel Garcia proposed such a language feature, called Run-time bound array data members, in N3875 . There was much discussion of this proposal, and of runtime-size types in general, with an overall feeling that it was worth pursuing a core language feature in this area.
This paper proposes an alternative way of allowing classes with runtime-bound array data members (aka runtime-size types) in C++ that aims to avoid various issues that were discussed at the Issaquah meeting, as well as exploring the impact that adding runtime-size types would have on the rest of the C++ language.