The feature tag is described along with the language feature below. If the -pedantic-errors option is given, _has_extension is equivalent features not prefixed c_,Īnother use of _has_feature is to check for compiler features not related #endifįor backward compatibility, _has_feature can also be used to testįor support for non-standardized features, i.e. #endif #if _has_extension(cxx_rvalue_references) // This code will be compiled with the -std=c++11, -std=gnu++11, -std=c++98 // and -std=gnu++98 options, because rvalue references are supported as a // language extension in C++98. #if _has_feature(cxx_rvalue_references) // This code will only be compiled with the -std=c++11 and -std=gnu++11 // options, because rvalue references are only standardized in C++11. #endif #ifndef _has_extension #define _has_extension _has_feature // Compatibility with pre-3.0 compilers. #define _has_feature(x) 0 // Compatibility with non-clang compilers. #ifndef _has_feature // Optional of course. Intrinsics Support within Constant Expressions.Specifying Linker Options on ELF Targets.Specifying section names for global objects (#pragma clang section). Specifying an attribute for multiple declarations (#pragma clang attribute).Extensions to specify floating-point flags.Extensions for selectively disabling optimization.Initializer lists for complex numbers in C.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |