[libcxx-commits] [libcxx] [libc++][math] Add missing `constexpr since C++23` comment for signbit (PR #212458)

Lucas Mellone via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 29 08:42:52 PDT 2026


lknknm wrote:

> Now there're more functions in `<cmath>` marked `_LIBCPP_CONSTEXPR_SINCE_CXX23`. I think it's better to mark all of them `// constexpr since C++23` in one PR and align theses comments.

@frederick-vs-ja I honestly couldn't find anything other than the ones I've already implemented and the ones I've already corrected, meaning only signbit was missing afaik:
```cpp
bool signbit(arithmetic x); // constexpr since C++23

int fpclassify(arithmetic x); // constexpr since C++23

bool isfinite(arithmetic x); // constexpr since C++23
bool isinf(arithmetic x);    // constexpr since C++23
bool isnan(arithmetic x);    // constexpr since C++23
bool isnormal(arithmetic x); // constexpr since C++23

bool isgreater(arithmetic x, arithmetic y);      // constexpr since C++23
bool isgreaterequal(arithmetic x, arithmetic y); // constexpr since C++23
bool isless(arithmetic x, arithmetic y);         // constexpr since C++23
bool islessequal(arithmetic x, arithmetic y);    // constexpr since C++23
bool islessgreater(arithmetic x, arithmetic y);  // constexpr since C++23
bool isunordered(arithmetic x, arithmetic y);    // constexpr since C++23
```
If you take a look at `constexpr-cxx23-clang.pass.cpp` there should be a relation of which ones are already implemented, and so far there are only the above.
On the other hand I don't think anything from P1383R2 was done so far.
Is that correct?

About the alignment, you mean we should we align all the comments in one column?

https://github.com/llvm/llvm-project/pull/212458


More information about the libcxx-commits mailing list