[libcxx-commits] [PATCH] D131317: [libc++] Implements constexpr <charconv>.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 10 09:28:00 PDT 2022
Mordante added inline comments.
================
Comment at: libcxx/include/__config:852-856
+# if _LIBCPP_STD_VER > 20
+# define _LIBCPP_CONSTEXPR_AFTER_CXX20 constexpr
+# else
+# define _LIBCPP_CONSTEXPR_AFTER_CXX20
+# endif
----------------
h-vetinari wrote:
> Mordante wrote:
> > philnik wrote:
> > > Mordante wrote:
> > > > philnik wrote:
> > > > > I've named this `_LIBCPP_CONSTEXPR_CXX23` in D131218 because I find it a lot more intuitive. I'll open a discussion on Discord whether we want this change or not.
> > > > Yeah it seems we manage to get 3 reviews that basically add this macro at the same time.
> > > > I keep it for now until we finished the discussion which direction to go.
> > > Sounds good to me. Although there seems to be no opposition to the change.
> > True, but I expect one of the other two patches to land before this one, so then I can remove this hunk, rebase, and fix the other places. There are some changes here that shouldn't be hiding in this review; but I really want to get a CI run before making these changes.
> To me, `_LIBCPP_CONSTEXPR_AFTER_CXX20` sounds like it is inclusive "after", i.e. also C++20.
>
> Perhaps "FROM" is less ambiguous w.r.t to `>=` vs. `>` than "AFTER"? I think the most intuitive option might be: `_LIBCPP_CONSTEXPR_FROM_CXX23`
To me after sounds exclusive. I'm not sure when `_LIBCPP_CONSTEXPR_AFTER_CXX11` was added, but I strongly expect that was in the era where C++0x had just slipped to C++11 and it was uncertain the then new 3 year schedule would be a real thing. So I understand the naming from a historical point of view. I prefer without the FROM since that's what we already do in our lit tests. We already settled on that in our Discord channel.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131317/new/
https://reviews.llvm.org/D131317
More information about the libcxx-commits
mailing list