[libcxx-commits] [libcxx] [libc++] std::byteswap support for _BitInt(N) (PR #196512)

Xavier Roche via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 24 08:22:04 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)
----------------
xroche wrote:

Added a short comment before the `assert` referencing [LWG4583](https://cplusplus.github.io/LWG/issue4583) :smile_cat: 

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


More information about the libcxx-commits mailing list