This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: conversions between vectors
On Fri, Dec 21, 2001 at 11:13:06PM -0200, Alexandre Oliva wrote:
> Nope. You can't assign a valarray<T1> to a valarray<T2> in C++, even
> if there's an implicit conversion from T1 to T2.
Not to mention in AltiVec terms,
vector char foo
vector int bar
foo is a vector of 16 characters, and bar is a vector of 4 ints.
So we've changed sizes as well.
I think it makes sense to be able to cast the vectors (which
valarray would _not_ allow, incidentally), but I do not think
it makes sense to allow assignment without casting.
r~