Page MenuHomePhabricator

Support C++1z features in `__has_extension`
Needs ReviewPublic

Authored by EricWF on May 6 2017, 5:25 PM.

Details

Reviewers
rsmith
Summary

This patch updates __has_extension to report the C++1z extensions Clang offers

Diff Detail

Event Timeline

EricWF created this revision.May 6 2017, 5:25 PM
EricWF updated this revision to Diff 98087.May 6 2017, 6:23 PM
  • Improve documentation
EricWF updated this revision to Diff 98088.May 6 2017, 7:57 PM
  • Correctly report that structured bindings, inline variables, and fold expressions are available in C++03.
filcab added a subscriber: filcab.Dec 3 2018, 6:33 AM

Hi Eric,

I know this is old, but are you interested in reviving this patch? I don't know enough about clang's extensions to LGTM such a patch (updated for the current code), but would really like to have a way to know if extensions are supported.
We just now had people ask how to detect if if constexpr is available, and not having a feature check makes it much harder to figure out (and makes our test based on current clang behaviour).

Thank you,
Filipe

EricWF added a comment.Dec 3 2018, 9:45 AM

I don't mind picking it up again, but it won't be until next week.