[libcxx-commits] [PATCH] D143797: [libc++] Mark some variables as inline, per the spec
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 12 10:24:57 PST 2023
Mordante added inline comments.
================
Comment at: libcxx/include/__config:895
+# if _LIBCPP_STD_VER >= 17
+# define _LIBCPP_INLINE_VAR inline
+# else
----------------
ldionne wrote:
> Mordante wrote:
> > I wonder should we use this instead? And just `constexpr` in the `#else`. For me that makes it easier to understand what the macro does.
> >
> The problem is that we still want those variables to be `constexpr` even in pre C++17.
Yes therefore I suggested "And just `constexpr` in the `#else`". With our attributes we often write the "ideal" version for a certain C++ version and a work-around for older versions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143797/new/
https://reviews.llvm.org/D143797
More information about the libcxx-commits
mailing list