[libcxx-commits] [PATCH] D131498: [libc++][NFC] Rename the constexpr macros

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 13 05:10:49 PDT 2022


Mordante added inline comments.


================
Comment at: libcxx/include/__config:835
 #  if _LIBCPP_STD_VER > 11
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#    define _LIBCPP_CONSTEXPR_CXX14 constexpr
 #  else
----------------
philnik wrote:
> jloser wrote:
> > huixie90 wrote:
> > > I am ok with the name in your patch. But have you considered
> > > `_LIBCPP_CONSTEXPR_SINCE_CXX14`
> > > The reason why I like this name is because in the synopsis it is exact these words "// constexpr since C++14"
> > I quite like the naming convention of using "since", e.g. `_LIBCPP_CONSTEXPR_SINCE_CXX14` as you proposed, @huixie90. I'm also not opposed to @philnik current proposed rename as I do like it better than the status quo on top of tree.
> I have considered the name, but I think that `_LIBCPP_CONSTEXPR_SINCE_CXXab` is unnecessarily verbose. We already use `TEST_CONSTEXPR_CXXab` in the tests and AFAIK nobody ever complained about it. @ldionne also proposed `_LIBCPP_CONSTEXPR_IN_CXXab`, but there the same applies.
+1 for using the same naming style in our main code and our tests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131498



More information about the libcxx-commits mailing list