[libcxx-commits] [libcxx] [libc++] Implement LWG4290: Missing Mandates clauses on is_sufficiently_aligned (PR #229765)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 8 04:05:23 PDT 2026


================
@@ -22,6 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <size_t _Alignment, class _Tp>
 [[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI bool __is_sufficiently_aligned(_Tp* __ptr) {
----------------
philnik777 wrote:

We don't use `__is_sufficiently_aligned` in versions earlier than C++20. Can we restrict this to C++20 and just use `std::has_single_bit` instead in the `static_assert`?

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


More information about the libcxx-commits mailing list