Chris Lattner wrote: > > On Apr 19, 2006, at 1:56 PM, Mark Mitchell wrote: > >> Let's accept that both the bit-preserving and value-preserving >> conversions would be useful. How do we differentiate the two? >> > >> For vectors, these operators would apply to each element, and then >> return a vector with the same number of elements as the input vector. >> >> I suppose that we could introduce these operators into C as well, >> although the pseudo-template syntax might not be as natural for C users. > > If you're interested in adding value for generic vectors, it may be > interesting to consider element access operations.
Yes, I think that would be very useful to do. The original topic was specifically about casts, from a language-design perspective, so I was trying to answer that, but I'm glad to switch the conversation in the direction of what can we do to make it easier for people to get good use of generic vectors. -- Mark Mitchell CodeSourcery [EMAIL PROTECTED] (650) 331-3385 x713