stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <>
Subject [jira] Created: (STDCXX-622) valarray operator requirements not consistent with standard
Date Fri, 26 Oct 2007 23:38:50 GMT
valarray operator requirements not consistent with standard

                 Key: STDCXX-622
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 26. Numerics
    Affects Versions: 4.2
            Reporter: Travis Vitek
            Assignee: Travis Vitek
            Priority: Minor
             Fix For: 4.2.1 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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message