This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Dup status.
Section: 184.108.40.206 [valarray.access] Status: Dup Submitter: Levente Farkas Opened: 1998-09-09 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [valarray.access].
View all issues with Dup status.
Duplicate of: 389
T operator (size_t) const;
const T& operator (size_t) const;
as in vector ???
One can't copy even from a const valarray eg:
memcpy(ptr, &v, v.size() * sizeof(double));
[I] find this bug in valarray is very difficult.
The LWG believes that the interface was deliberately designed that way. That is what valarray was designed to do; that's where the "value array" name comes from. LWG members further comment that "we don't want valarray to be a full STL container." 220.127.116.11 [valarray.access] specifies properties that indicate "an absence of aliasing" for non-constant arrays; this allows optimizations, including special hardware optimizations, that are not otherwise possible.