RFC: What should go in our <version> header?
Ville Voutilainen
ville.voutilainen@gmail.com
Mon Jun 18 12:12:00 GMT 2018
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.
More information about the Libstdc++
mailing list