[libcxx-commits] [libcxx] [libc++] std::byteswap support for _BitInt(N) (PR #196512)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 10 08:16:08 PDT 2026
================
@@ -23,27 +24,34 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 23
template <integral _Tp>
+ requires(sizeof(_Tp) == 1 || (numeric_limits<_Tp>::digits + numeric_limits<_Tp>::is_signed) % 16 == 0)
----------------
philnik777 wrote:
I'm wondering whether we should accept _BitInts that are between 1 and 7. Supporting `bool` feels weird already, but that's required by the standard. Any thoughts on this?
https://github.com/llvm/llvm-project/pull/196512
More information about the libcxx-commits
mailing list