[libcxx-commits] [PATCH] D79555: [libc++] [C++20] [P0415] Constexpr for std::complex.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 20 16:50:07 PST 2022
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM w/ green CI and assuming the answer to my question is "yes" (i.e. you didn't slip a change to the non-constexpr code path).
================
Comment at: libcxx/include/complex:755-766
_Tp __denom = __c * __c + __d * __d;
- _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
- _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
- if (__constexpr_isnan(__x) && __constexpr_isnan(__y))
+ _Tp __x = std::__constexpr_scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
+ _Tp __y = std::__constexpr_scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
+ if (std::__constexpr_isnan(__x) && std::__constexpr_isnan(__y))
{
- if ((__denom == _Tp(0)) && (!__constexpr_isnan(__a) || !__constexpr_isnan(__b)))
+ if ((__denom == _Tp(0)) && (!std::__constexpr_isnan(__a) || !std::__constexpr_isnan(__b)))
{
----------------
Can you confirm that this is the old implementation, we only changed calls to `foo` to `__constexpr_foo`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79555/new/
https://reviews.llvm.org/D79555
More information about the libcxx-commits
mailing list