I'm on why typeid isn't recognized

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

 



Building with these arguments:

g++ -fPIC -g -O0 -Wall -std=c++0x

I get this error:

/include/element.hh:101:26: error: ISO C++ forbids declaration of ‘typeof’ with no type
.../include/element.hh:101:28: error: expected ‘;’ before ‘differenceType’


Here's line 101:

typedef typeof(T() - T()) differenceType;

I've tried to create a small program to reproduce it but can't make it fail! I build my example with the same arguments as the big one.

template<typename T>
struct foo
{
typedef typeof(T()-T()) difference_type;
};

int main()
{
foo<int> f;
}



[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