This is the mail archive of the
mailing list for the GCC project.
[C++11, C++14 PATCH 0/3] Support for SD-6: SG10 Feature Test Recommendations
- From: Ed Smith-Rowland <3dw4rd at verizon dot net>
- To: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Fri, 30 May 2014 23:41:33 -0400
- Subject: [C++11, C++14 PATCH 0/3] Support for SD-6: SG10 Feature Test Recommendations
- Authentication-results: sourceware.org; auth=none
A group within the C++ standards committee was charged with the
responibility of coming up with a way for users to test a C++ compiler
and runtime for the availability of new features. These features are
intended to aid users in a time of intense C++ evolution. These
features are not really part of the C++ standard and probably can't be
The latest paper is:
Also, an earlier version is supplied as a standing document on the
The current patch implements __has_include and many of the language
feature and library version macros outlined in these documents.
I builds and tests clean on x86_64-linux.
I anticipate that the next C++ meeting will see some additions (new
library and language macros and a __has_cpp_attribute). I will add
these as a separate patch if needed.
I took the liberty of adding __has_include_next. clang has both
__has_include and __has_include_next. Also, while the underlying cpp
builtin that supports __has_include, __has_include__, is available to C
and C++ in all language versions, the macro __has_include is only
available for C++11 onwards. One could however anticipate that this
feature has utility for all C/C++ users. What do you think?