me22 wrote:
Yeah, that's a problem! Love the decltype solution, but it does the same. So gcc chooses between typeof and decltype with #ifdef __GXX_EXPERIMENTAL_CXX0X__On 28 January 2010 01:31, Patrick Horgan <phorgan1@xxxxxxxxx> wrote:In a templated class we define our difference type like this: typedef typeof(T() - T()) differenceType;That works? Wouldn't it give unsigned when T is unsigned?
Anyone know if that's always set for -std=c++0x? Patrick