RFC: What should go in our <version> header?
Jonathan Wakely
jwakely@redhat.com
Fri Jun 15 15:52:00 GMT 2018
C++20 adds a <version> header, which should define all the library
feature test macros, as well as implementation-specific macros like
_GLIBCXX_RELEASE and __GLIBCXX__.
We should decide whether to implement <version> by simply including
<bits/c++config.h> and then adding the feature test macros, or if we
should keep it minimal and *only* define _GLIBCXX_RELEASE and
__GLIBCXX__ and the feature tests (and then have <bits/c++config.h>
include <version>?)
I think I prefer to make <version> just include <bits/c++config.h>.
I think we should define the feature-test macros in both <version> and
the relevant header (e.g. __cpp_string_view in <string_view>). We
could make everything include <version> and then every header would
define every feature test macro, but I don't think that's good for
portability.
My preference is implemented by the attached patch.
While on the subject, should we just delete some of this autoconf-junk
from our c++config.h headers?
/* Name of package */
/* #undef _GLIBCXX_PACKAGE */
/* Define to the address where bug reports for this package should be sent. */
#define _GLIBCXX_PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define _GLIBCXX_PACKAGE_NAME "package-unused"
/* Define to the full name and version of this package. */
#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused"
/* Define to the one symbol short name of this package. */
#define _GLIBCXX_PACKAGE_TARNAME "libstdc++"
/* Define to the home page for this package. */
#define _GLIBCXX_PACKAGE_URL ""
/* Define to the version of this package. */
#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 6261 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20180615/214a4760/attachment.bin>
More information about the Libstdc++
mailing list