On Mon, Oct 20, 2008 at 07:21:49PM -0700, Andrew Pinski wrote: > On Mon, Oct 20, 2008 at 7:19 PM, Peng Yu <[EMAIL PROTECTED]> wrote: > > Could you please help explain what the difference between typeof and > > decltype are? What are c++0x/g++0x modes? > > Well decltype is part of the C++0x standard > (http://gcc.gnu.org/projects/cxx0x.html, > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf ). > typedef is a GCC extension.
You meant to say "typeof", of course. Is there a reason why typeof shouldn't just be a synonym for decltype? If there's an extension that's almost the same as a new standard feature, it would seem easiest to make it exactly the same, unless that would cause extensive breakage (if it breaks corner cases that might not be such a big deal, for an extension).
