Created on 2008-07-20.00:00:00 last changed 171 months ago
Proposed resolution:
Change [valarray.cons], paragraph 2:
explicit valarray(size_t);The array created by this constructor has a length equal to the value of the argument. The elements of the array are
constructed using the default constructor for the instantiating type Tvalue-initialized ([dcl.init]).
Change [valarray.members], paragraph 9:
[Example: If the argument has the value -2, the first two elements of the result will be
constructed using the default constructorvalue-initialized ([dcl.init]); the third element of the result will be assigned the value of the first element of the argument; etc. -- end example]
[ Batavia (2009-05): ]
We agree with the proposed resolution. Move to NAD Editorial.
From [valarray.cons], paragraph 2:
explicit valarray(size_t);The array created by this constructor has a length equal to the value of the argument. The elements of the array are constructed using the default constructor for the instantiating type T.
The problem is that the most obvious Ts for valarray are float and double, they don't have a default constructor. I guess the intent is to value-initialize the elements, so I suggest replacing:
The elements of the array are constructed using the default constructor for the instantiating type T.
with
The elements of the array are value-initialized.
There is another reference to the default constructor of T in the non-normative note in paragraph 9. That reference should also be replaced. (The normative wording in paragraph 8 refers to T() and so it doesn't need changes).
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg4124 |
2010-10-21 18:28:33 | admin | set | messages: + msg4123 |
2008-07-20 00:00:00 | admin | create |