[libcxx-commits] [PATCH] D97904: [libcxx] updates the feature-test macro generator
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 4 13:02:48 PST 2021
Quuxplusone added inline comments.
Comment at: libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp:4099
# ifdef __cpp_lib_math_constants
-# error "__cpp_lib_math_constants should not be defined when defined(__cpp_concepts) && __cpp_concepts >= 201907L is not defined!"
+# error "__cpp_lib_math_constants should not be defined when !defined(_LIBCPP_HAS_NO_CONCEPTS) is not defined!"
> cjdb wrote:
> > This (and elsewhere) feels wrong to me.
> It looks odd, but it's correct. It has been added in D82171 since the it broke some build bots. The header contains the `__floating_point` concept. (the `std::` added in that patch is no longer there.)
I guess you mean the phrasing of the error message itself, right? Yes but I wouldn't worry about it. :)
As for the fact that `<numbers>` depends on `<concepts>` in the first place, wow, yeah, that is unfortunate; but I've checked that it is physically accurate: `<numbers>` does start with the line
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
which does literally mean that if the compiler doesn't support concepts then you can't use `std::pi`.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits