[Bug c++/60512] would be useful if gcc implemented __has_feature similary to clang

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jun 8 08:50:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60512

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. checking #if __cpp_attributes works correctly with all versions of GCC
(with a true result since 4.9.2 and false otherwise), whereas adding a new
__has_feature extension and using #if __has_feature(attributes) would only give
the right answer for GCC releases that support the feature.


More information about the Gcc-bugs mailing list