Section: 18.104.22.168 [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 (22.214.171.124 [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