incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <>
Subject RE: [PATCH] 26.valarray.cassign.cpp
Date Fri, 27 Jul 2007 16:52:11 GMT
> -----Original Message-----
> From: Martin Sebor [] On Behalf Of Martin Sebor
> Sent: Friday, July 27, 2007 7:06 PM
> To:
> Subject: Re: [PATCH] 26.valarray.cassign.cpp
> Farid Zaripov wrote:
> >   The 26.valarray.cassign.cpp test expect that UserClass 
> type provides 
> > +, -, *, / operations. But these operations are not defined in 
> > rw_value.h.
> HP aCC and Intel C++ compile the code but I did notice some 
> errors from gcc yesterday, and I see Sun C++ has trouble with 
> the code as well. I tend to trust Intel C++ over the other 
> compilers, so I wonder if the reasons for the error are 
> actually compiler bugs. Otherwise there's a bug in Intel
> C++ (and HP aCC), or we're relying on some extension. What's
> your take on it?

  As I see from night build results, that Intel C++ 10.0 and acc 6.13
also failed to compile:

  The test instantiating valarray<UserClass>::operator{+-/*}= (...)
operators, but they can't be instantiated
because of  UserClass has not provided +,-,/,* operations.

>From standard: valarray computed assignment [valarray.cassign]
valarray<T>& operator*= (const valarray<T>&);
valarray<T>& operator/= (const valarray<T>&);
valarray<T>& operator%= (const valarray<T>&);
valarray<T>& operator+= (const valarray<T>&);
valarray<T>& operator-= (const valarray<T>&);
valarray<T>& operator^= (const valarray<T>&);
valarray<T>& operator&= (const valarray<T>&);
valarray<T>& operator|= (const valarray<T>&);
valarray<T>& operator<<=(const valarray<T>&);
valarray<T>& operator>>=(const valarray<T>&);
1 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.


View raw message