Boost logo

Boost :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-02-28 09:24:18


AlisdairM wrote:

> i.e: I assume the following are the same type (and not just
> equivalent)
>
> typedef typename add_ref< add_const< T > >::type ref_const_t;
> typedef typename add_const< add_ref< T > >::type const_ref_t;

Ok, I REALLY need to get a better proof-reader:

I assume the following are the same type (and not just equivalent)

typedef typename add_ref< add_const< T >::type >::type ref_const_t;
typedef typename add_const< add_ref< T >::type >::type const_ref_t;

Instead I get 2 distinct types with all Borland compiler I have access
to:

T const &
T & const

The latter does not look like a valid C++ type to me, and I have
recently filed a bug report with Borland about this. I am sure they
would like to hear I am wrong, and their compiler is correct ;?)

---
AlisdairM

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