This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: RFC: What should go in our <version> header?
- From: Ville Voutilainen <ville dot voutilainen at gmail dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Jun 2018 15:12:38 +0300
- Subject: Re: RFC: What should go in our <version> header?
- References: <20180615155239.GT6295@redhat.com> <b0dc32fe-a377-8f9f-4224-d00e0efe4218@verizon.net>
On 17 June 2018 at 19:49, Ed Smith-Rowland <3dw4rd@verizon.net> wrote:
> On 06/15/2018 11:52 AM, Jonathan Wakely wrote:
>>
>> 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.
>>
> This is pretty much what I was looking at doing. I say go!
+1 looks reasonable to me.