[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
Mon Jun 22 02:44:00 PDT 2026


================
@@ -37,6 +41,66 @@ 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. libc++
+// backports decltype and static_assert to C++03, so the probes run there too.
----------------
frederick-vs-ja wrote:

```suggestion
// std::abs has __int128/_BitInt(N) overloads as a libc++ extension.
```

I don't think we should mention backport of `decltype` and `static_assert` in comments. It might be helpful to mention this in documentation, though.

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


More information about the libcxx-commits mailing list