Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-12 11:12:53


"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>
>> 3 If BOOST_TYPEOF knows the result type of the expression, that is
>> type. Note that we're on slightly shaky ground here because we'll
>> mis-report const lvalues as rvalues... unless someone can figure
>> out how to apply Eric N.'s ?: discoveries to know for sure.
>
> Just to make sure that we are on the same page, did you mean we mis-report
> const non-references as const lvalues? For example, if a function is
> declared as "const int foo()" (which makes little sense to me, but
> possible), LVALUE_TYPEOF would yield: "const int&".

Yes, that's what I meant. I'm more concerned with returning const
class types, for what it's worth.

Note that since you *do* have a runtime expression, it seems like
Eric's technique might apply here.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk