[libcxx-commits] [PATCH] D133323: [libc++] Bump _LIBCPP_STD_VER to the next expected C++ version

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 23 11:05:30 PDT 2022


Mordante added a comment.

In D133323#3782870 <https://reviews.llvm.org/D133323#3782870>, @ldionne wrote:

> In D133323#3782371 <https://reviews.llvm.org/D133323#3782371>, @Mordante wrote:
>
>> In D133323#3771034 <https://reviews.llvm.org/D133323#3771034>, @philnik wrote:
>>
>>> In D133323#3770792 <https://reviews.llvm.org/D133323#3770792>, @Mordante wrote:
>>>
>>>>> We've decided to use _LIBCPP_STD_VER >= xy while discussing to change the constexpr macros, so let's finally bump the version macro to match that.
>>>>
>>>> I don't recall that was decided during that in that review. Can you share the link where that decision was made? (Or remove that part of the commit message.)
>>>
>>> I brought it up during the discussion on Discord and nobody objected, so I assumed everybody was OK with it. @avogelsgesang and @ldionne also explicitly asked about it there.
>>
>> I don't feel "I assumed everybody was OK with it" sounds as a discision.
>> I don't mind seeing it in new code. But rather not see existing code in, areas with a lot of active development, changed. Or changes that affect patches under review.
>
> I do remember we had a discussion on Discord and several folks chimed in, but I don't remember exactly who did. My understanding after the discussion on Discord is that we were going to move forward with this approach. My understanding is also that I was the only one to oppose at the beginning.

IMO then, for the future, we should make it clear whether we reached consensus and what the way forward is.
I would say a good way to do that is to update our libc++ developer documentation to reflect the new agreement.

AFAIK we only agreed to update the macro so we can use `>= 23` but not require to use this new style. I really would like to have one style in one file and not to mix them in one file.



================
Comment at: libcxx/include/__config:51
+// Expected release year of the next C++ version
+#      define _LIBCPP_STD_VER 23
 #    endif
----------------
mclow.lists wrote:
> philnik wrote:
> > Mordante wrote:
> > > Please do the same for the test macro including the comment.
> > The test macro is defined as 99 currently, so we can already use `TEST_STD_VER >= 23`.
> Until C++23 is released, I would recommend not changing these macros.
> 
> The test macro is defined differently than the one in __config in an attempt to make it harder for people to depend on numbers that are not guaranteed to be stable.
> 
> The code `XXX_STD_VER > 20` will work for all standard versions later than C++20.
> 
> 
@mclow.lists For my curiosity can you tell why you don't recommend to change this macro?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133323/new/

https://reviews.llvm.org/D133323



More information about the libcxx-commits mailing list