Since the LHS (result) type informs both arms of the conditional, the
solution for fixed width
types should be the same as if you'd used explicit casts (bitwise
blending, right?).
For the more complex cases, I'm not sure there are real benefits. But
consider that section 11.4.14.1
gives formulae for concatenating any kind of operand into a stream. It
seems to me that if you
can
concatenate, you could certainly
blend the two
arguments to a concatenation operator.
I admit that the resizing rules would be perverse and the blending rule
might be obsolete in this
new context. It isn't a high-priority musing, just an exercise.
Steven Sharp wrote:
I also wonder if ?: can be used for stream selection, since it can pass down
assignment pattern type info.
What would you do if the selector was unknown?
Steven Sharp | Architect | Cadence
P: 508.459.1436 M: 774.535.4149 www.cadence.com
--
This message has been scanned for viruses and
dangerous content by
MailScanner, and is
believed to be clean.
Received on Wed May 5 14:59:06 2010