Boost logo

Boost :

From: Atry (pop.atry_at_[hidden])
Date: 2007-06-02 14:09:53


Giovanni Piero Deretta wrote:
> On 6/2/07, Atry <pop.atry_at_[hidden]> wrote:
>
>> #include <boost/typeof/typeof.hpp>
>> #include <boost/static_assert.hpp>
>> int a = 0;
>> int& b = a;
>> BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(b), int&>::value));
>>
>>
>
> IIRC (do not have the docs at hand right now), BOOST_TYPEOF drops
> toplevel references. So does gcc builtin typeof and, I think, the
> proposed 'auto' type deduction (while decltype should preserve them).
>
> HTH,
>
> gpd
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
>
Thanks. But is there any way to determine if an expression is reference?


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