[C++ PATCH] Implementation of C++0x decltype
Andrew Pinski
pinskia@physics.uc.edu
Sun Feb 4 02:55:00 GMT 2007
> The attached patches (for gcc, cp, testsuite subdirs) implement the C+
> +0x "decltype" facility, which computes the declared type of an
> arbitrary expression. The latest standard wording, on which this
> patch is based, is available here:
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2115.pdf
>
> Decltype has not yet been voted into the C++0x working draft, but it
> has been approved by the C++ Evolution Working Group and has been
> extensively discussed in the Core Working Group, so it is relatively
> stable (only corner cases are likely to change). It's a highly-
> requested feature in the library writer community. This patch only
> makes decltype available when the experimental C++0x mode is enabled.
>
> Tested i386-apple-darwin8.8.1, no regressions.
Can you explain the difference between typeof and decltype? Also it
seems like all of the C++0x extensions that are implemented should
have a mention in the documentation in a new section called something
like C++0x working draft or something like that. Or you could something
like Gfortran's manual does:
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gfortran/Standards.html
Which seems like a good idea also.
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list