[libcxx-commits] [libcxx] [libc++] std::abs support for _BitInt(N) and __int128 (PR #196532)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 19 05:38:32 PDT 2026
================
@@ -37,6 +37,68 @@ void test_big() {
assert(std::abs(negative_big_value) == big_value); // make sure it doesn't get casted to a smaller type
}
+// std::abs has __int128/_BitInt(N) overloads as a libc++ extension. The
+// decltype-SFINAE probes below need C++11.
+#if TEST_STD_VER >= 11
----------------
frederick-vs-ja wrote:
I think we can enable the test coverage in C++03 mode, as libc++ backports `decltype` to C++03.
https://github.com/llvm/llvm-project/blob/a6fe3c7422db83346c336346e0b7a56ff084b17f/libcxx/include/__config#L164
We may need to skip coverage for frozen C++03 headers (by `// XFAIL: FROZEN-CXX03-HEADERS-FIXME`), though.
https://github.com/llvm/llvm-project/pull/196532
More information about the libcxx-commits
mailing list