[libcxx-commits] [libcxx] [libc++][math] Implement C++23 (parts of) P0533: constexpr `std::div()` (PR #104633)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Aug 17 08:13:44 PDT 2024
================
@@ -63,11 +63,11 @@ long abs( long j);
long long abs(long long j); // C++0X
long labs( long j);
long long llabs(long long j); // C99
-div_t div( int numer, int denom);
-ldiv_t div( long numer, long denom);
-lldiv_t div(long long numer, long long denom); // C++0X
-ldiv_t ldiv( long numer, long denom);
-lldiv_t lldiv(long long numer, long long denom); // C99
+constexpr div_t div( int numer, int denom);
+constexpr ldiv_t div( long numer, long denom);
+constexpr lldiv_t div(long long numer, long long denom); // C++0X
+constexpr ldiv_t ldiv( long numer, long denom);
+constexpr lldiv_t lldiv(long long numer, long long denom); // C99
----------------
frederick-vs-ja wrote:
Perhaps we should say `constexpr since C++23` (see also [`<string>`](https://github.com/llvm/llvm-project/blob/76161451f5ca837b25769c7d142f8271b45d9b28/libcxx/include/string)).
Also, as these lines are touched, I think it's better to say `C++11` instead of `C++0x`.
https://github.com/llvm/llvm-project/pull/104633
More information about the libcxx-commits
mailing list