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

Michel Morin mimomorin at gmail.com
Thu Mar 1 08:00:53 PST 2012


Jonathan Sauer wrote:
>> 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.

Agreed. I first took that approach in this post:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120220/053844.html

But there was no response. So I made another patch (in this thread)
which does not require a new feature name.


Regards,
Michel



More information about the cfe-commits mailing list