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 .