[cfe-commits] [Patch] Documentation update: use __has_feature(__cxx_decltype__) to detect N3276 decltype

Jonathan Sauer jonathan.sauer at gmx.de
Thu Mar 1 07:42:03 PST 2012


Hello,

> This patch updates documentation of feature checking macros
> to describe __has_feature(__cxx_decltype__) can be used to detect
> the C++11 decltype (N3276) support.
> 
> N3276 decltype was implemented in r151117 (am I right?), and
> "feature names with double underscores" was implemented in r151445.
> So, __has_feature(__cxx_decltype__) can be used to detect N3276 decltype.

While indeed true, from a user's perspective I find the change to be highly
confusing: Normally, "__feature__" is a synonym for "feature", but in this
case it can be also used to check for the extension of a feature? If a check
for N3276 is needed, I think it should get its own distinct name.


Jonathan




More information about the cfe-commits mailing list