This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 22.214.171.124 [valarray.cons] Status: CD1 Submitter: Martin Sebor Opened: 2007-01-20 Last modified: 2016-02-10
Priority: Not Prioritized
View all other issues in [valarray.cons].
View all issues with CD1 status.
The Effects clause for the default
suggests that it is possible to increase the size of an empty
valarray object by calling other non-const member
functions of the class besides
resize(). However, such an
interpretation would be contradicted by the requirement on the copy
assignment operator (and apparently also that on the computed
assignments) that the assigned arrays be the same size. See the
reflector discussion starting with c++std-lib-17871.
In addition, Footnote 280 uses some questionable normative language.
Reword the Effects clause and Footnote 280 as follows (126.96.36.199 [valarray.cons]):
Effects: Constructs an object of class
valarray<T>,279) which has zero length
until it is passed into a library function as a modifiable lvalue or through a non-constant this pointer.280)
Footnote 280: This default constructor is essential, since arrays of
are likely to prove useful. There shall also be a way to change the size of an array after initialization; this is supplied by the semanticsof the