[libcxx-commits] [libcxx] [libc++] std::abs support for _BitInt(N) and __int128 (PR #196532)
Xavier Roche via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 16 01:01:47 PDT 2026
xroche wrote:
> More generally, `std::abs` is specified in a rather weird way where the argument types are explicitly specified in the standard. We notably don't have a `__int128` overload either. Do we actually want to extend here?
Good question. The __int128 half closes a concrete gap (currently std::abs(__int128_t(-x)) doesn't compile or routes through abs(double) !); the _BitInt half is part of the broader RFC.
I can split the PR so __int128 lands on its own and the _BitInt part waits for the broader extensions discussion to settle, or skip one of them; I'm unsure what's the best road to be honest.
What do you think ?
https://github.com/llvm/llvm-project/pull/196532
More information about the libcxx-commits
mailing list