
Jonathan Turkanis wrote:
"Eric Niebler" <eric@boost-consulting.com> wrote in message news:41AEFA46.4030305@boost-consulting.com...
Jonathan Turkanis wrote:
Yeah, that's what I was thinking about last night. I was trying to see how
close
I could approximate decltype.
Here is an interesting way to "distinguish" between L-values and R-values. The following program uses the properties of the conditional operator to implement an IS_LVALUE macro that detects the value-ness of an expression and prints its determination.
I thought of using the conditional operator as I was lying in bed last night. I was going to try it this morning ;-)
Same here. Reminded me of the type deduction stuff in Phoenix-2 where lazy versions of c?e:t does the right thing on lvalues. Dave beat us to the punch! ;-) -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net