
2 Jun
2007
2 Jun
'07
5:12 p.m.
On 6/2/07, Atry <pop.atry@gmail.com> 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