|
Boost : |
From: Joel de Guzman (joel_at_[hidden])
Date: 2004-12-02 11:35:48
Jonathan Turkanis wrote:
> "Eric Niebler" <eric_at_[hidden]> wrote in message
> news:41AEFA46.4030305_at_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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk