Re: with -std=c++0x typeof is gone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



me22 wrote:
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?
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__
Anyone know if that's always set for -std=c++0x?

Patrick


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux