[libcxx-commits] [PATCH] D106364: [libc++] Add `__libcpp_copysign` conditionally constexpr overloads.
Marek Kurdej via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 21 07:02:40 PDT 2021
curdeius added inline comments.
================
Comment at: libcxx/include/math.h:1137
+#endif
+inline _LIBCPP_INLINE_VISIBILITY double __libcpp_copysign(double __lcpp_x, double __lcpp_y) _NOEXCEPT {
+#if __has_builtin(__builtin_copysign)
----------------
FYI, this overload is necessary because, as Arthur correctly mentioned, `copysign(double, double)` is handled by `using ::copysign _LIBCPP_USING_IF_EXISTS;`, but there's no equivalent for `__libcpp_copysign` and using `__libcpp_copysign(double, double)` provokes an assertion failure in the template function because both types are the same.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106364/new/
https://reviews.llvm.org/D106364
More information about the libcxx-commits
mailing list