4.2.7 __has_cpp_attribute

The special operator __has_cpp_attribute (operand) may be used in ‘#if’ and ‘#elif’ expressions in C++ code to test whether the attribute referenced by its operand is recognized by GCC. __has_cpp_attribute (operand) is equivalent to __has_attribute (operand) except that when operand designates a supported standard attribute it evaluates to an integer constant of the form YYYYMM indicating the year and month when the attribute was first introduced into the C++ standard. For additional information including the dates of the introduction of current standard attributes, see SD-6: SG10 Feature Test Recommendations.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-9.3.0/cpp/_005f_005fhas_005fcpp_005fattribute.html