C++ Logo

SG10

Advanced search

Subject: Re: Fwd: Is __cpp_lib_constexpr_char_traits "official"?
From: Jonathan Wakely (cxx_at_[hidden])
Date: 2020-06-15 09:36:59


On Mon, 15 Jun 2020 at 15:24, Barry Revzin <barry.revzin_at_[hidden]> wrote:

>
>
> On Mon, Jun 15, 2020 at 5:45 AM Jonathan Wakely via SG10 <
> sg10_at_[hidden]> wrote:
>
>> Please see the 2018 thread below. I think this macro should be added to
>> SD-6 and the IS, and I think it should also be updated to 201811L for the
>> P1032R1 "Misc constexpr bits" changes that made the remaining char_traits
>> members constexpr. All the other bits of P1032R1 have their own macro now
>> instead of __cpp_lib_constexpr_misc, but not the char_traits bits.
>>
>> Libstdc++ has been defining __cpp_lib_constexpr_char_traits to 201611 for
>> years (and I'm about to update the value to 201811 in the relevant
>> branches).
>>
>> Any objection before I open an LWG issue?
>>
>
> Should it go into __cpp_lib_constexpr_string, based
> https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#constexpr
> ?
>
>
It could do, but it affects string_view equally.

I suppose we could say that the current values for constexpr_string and
constexpr_string_view also assume support for constexpr in char_traits, so
that implementations should not define the latest values until they've done
the char_traits parts.

So we'd have three possible values for constexpr_string, 201611 for P0436,
201811 for P1032, and 201907 for P0980 (which is already there). And two
values for constexpr_string_view, 201611 for P0436 and 201811 for P1032
(which is already there).

I can send a pull request to do that if you like.



SG10 list run by sg10-owner@lists.isocpp.org