Issue Details (XML | Word | Printable)

Key: STDCXX-622
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Travis Vitek
Reporter: Travis Vitek
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

valarray operator requirements not consistent with standard

Created: 26/Oct/07 11:37 PM   Updated: 11/Jan/08 09:50 PM
Return to search
Component/s: 26. Numerics
Affects Version/s: 4.2.0
Fix Version/s: 4.2.1

Time Tracking:
Not Specified

Issue Links:
Duplicate
 

Severity: Incorrect Behavior
Resolution Date: 11/Jan/08 09:50 PM


 Description  « Hide
26.3.2.6 p1 says

Each of these operators may only be instantiated for a type T to which the indicated operator can be
applied. Each of these operators performs the indicated operation on each of its elements and the corresponding
element of the argument array. [for operators *=, /=, %=, +=, -=, ^=, &=, |=, <<= and >>=]

The current implementation of the valarray member operators violate these requirements. Internally they use the transform algorithm with one of the function adapters [i.e. multiplies, divides]. So valarray<T>::operator+=() will use T::operator+() and T::operator=() when it should be using T::operator+=(). As a direct result of this, the 26.valarray.cassign test fails to compile on all platforms.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Travis Vitek made changes - 11/Jan/08 09:50 PM
Field Original Value New Value
Link This issue duplicates STDCXX-512 [ STDCXX-512 ]
Travis Vitek made changes - 11/Jan/08 09:50 PM
Resolution Duplicate [ 3 ]
Status Open [ 1 ] Closed [ 6 ]