[libcxx-commits] [PATCH] D99789: [libc++] Add fallback standard flags and normalize corresponding feature.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 4 06:35:06 PDT 2021


Mordante added a comment.

I like this patch a lot. This makes it a lot easier to switch to newer C++ versions shortly after their release without the need to wait for the compilers to update.
Please update or rebase the patch to trigger the CI.



================
Comment at: libcxx/utils/libcxx/test/params.py:11-12
 
-_allStandards = ['c++03', 'c++11', 'c++14', 'c++17', 'c++2a', 'c++2b']
+_allStandards = ['c++03', 'c++11', 'c++14', 'c++17', 'c++20', 'c++23']
+_standardFallback = {'c++11': 'c++0x', 'c++14': 'c++1y', 'c++17': 'c++1z', 'c++20': 'c++2a', 'c++23': 'c++2b'}
+_standardFallbackReverse = dict((v, k) for k, v in _standardFallback.items())
----------------
Quuxplusone wrote:
> I have two weak rationales here:
> - Technically, it's not "C++23" until it's released. I don't want to get into a situation where we have to //remove// the string `c++23` from this codepath. So we should leave it as `c++2b` until 2023.
> - I'd like to see us develop a "deploy plan" for moving from one standardization-epoch to the next, which we execute atomically every 3 years. I described my ideal here: [SADLY I CANNOT LOCATE THIS REVIEW ANYMORE maybe @Mordante remembers our discussion and can dig it up?] Therefore I'd like this patch to get us into the "C++20 has been released, C++2b has not yet been released" state. Three years from now, we can atomically move into the "C++23 has been released, C++2c has not yet been released" state. I don't want us to ever be in some halfway state like the "C++23 has been released sorta not really" state described in this patch right now.
> 
> D93383 was related. D65043 was loosely related.
> 
> I //think// (but am not 100% sure) that all I'm asking for here is to replace `'c++23'` with `'c++2b'` in the one place it appears. Everything else can stay the same, right?
I recall the discussion, but also can't find it anymore. I'm also slightly in favour to use `c++2b` instead of `c++23`. I get the impression the members in the committee feel more comfortable with the 3 year plan so I would be very surprised when `c++23` becomes `c++24`. Still I think using `c++2b` safer and give a nice statement the standard isn't released.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99789



More information about the libcxx-commits mailing list