File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,15 @@ struct BitmapWordAlignParams {
4444template <uint64_t ALIGN_IN_BYTES>
4545inline BitmapWordAlignParams BitmapWordAlign (const uint8_t * data, int64_t bit_offset,
4646 int64_t length) {
47+ // TODO: We can remove this condition once CRAN upgrades its macOS
48+ // SDK from 11.3.
49+ #if defined(__clang__) && !defined(__cpp_lib_bitops)
50+ static_assert ((ALIGN_IN_BYTES != 0 ) && ((ALIGN_IN_BYTES & (ALIGN_IN_BYTES - 1 )) == 0 ),
51+ " ALIGN_IN_BYTES should be a positive power of two" );
52+ #else
4753 static_assert (std::has_single_bit (ALIGN_IN_BYTES),
4854 " ALIGN_IN_BYTES should be a positive power of two" );
55+ #endif
4956 constexpr uint64_t ALIGN_IN_BITS = ALIGN_IN_BYTES * 8 ;
5057
5158 BitmapWordAlignParams p;
You can’t perform that action at this time.
0 commit comments