1
0
forked from boostorg/core
Commit Graph

27 Commits

Author SHA1 Message Date
Peter Dimov
5a3b4df5de Use __builtin_bit_cast when available 2023-06-01 02:38:57 +03:00
Peter Dimov
85527c4045 More -Wconversion fixes 2023-05-31 20:22:15 +03:00
Peter Dimov
266fbe6449 Fix -Wconversion warnings 2023-05-31 18:53:35 +03:00
Peter Dimov
06fef712c9 Use MS _byteswap intrinsics 2023-05-30 21:12:25 +03:00
Peter Dimov
f41b8f38c4 Use __builtin_bswap under GCC and Clang 2023-05-30 19:22:00 +03:00
Peter Dimov
b591214103 Add byteswap to bit.hpp 2023-05-30 19:09:09 +03:00
Peter Dimov
6c7edac9b1 Fix 32 bit constexpr failures 2023-05-30 04:32:23 +03:00
Peter Dimov
b2fe98edf8 Make bit manipulation functions constexpr on MSVC 19.25+. Closes #109. 2023-05-30 02:56:37 +03:00
Peter Dimov
b407b5d87d Change bit_width to return int, LWG3656 has been applied as a DR to C++20 2022-09-22 01:31:01 +03:00
Peter Dimov
66a742f41e Statically assert the unsigned integer requirements in bit.hpp. Fixes #129. 2022-09-21 19:19:02 +03:00
Peter Dimov
8645bcb06e Merge pull request #101 from boostorg/feature/bit_use_if_constexpr
bit.hpp: Use C++17 if constexpr where possible
2022-05-14 04:35:13 +03:00
Peter Dimov
cf619432a7 Fix GCC -Wlong-long warnings 2022-02-08 22:00:42 +02:00
Peter Dimov
bae7c049b0 Avoid conversion warning in bit_width 2022-01-19 17:20:39 +02:00
Andrey Semashev
213e4695bf Use C++17 if constexpr where possible. 2021-11-01 22:35:28 +03:00
Peter Dimov
a4b661068d Disable C4127, C4244 in bit.hpp 2021-11-01 02:14:43 +02:00
Peter Dimov
fa82b680cf Work around clang++ 3.3 failure 2020-12-30 19:40:52 +02:00
Peter Dimov
16e9536146 Implement boost::core::endian 2020-12-29 02:41:15 +02:00
Peter Dimov
919b98d425 Use __builtin_popcount 2020-12-29 02:06:56 +02:00
Peter Dimov
e8aa0c75b4 Use _BitScanForward 2020-12-29 02:02:33 +02:00
Peter Dimov
8bd2239b0b Use __builtin_ctz 2020-12-29 01:56:34 +02:00
Peter Dimov
c838ebc003 Use _BitScanReverse 2020-12-29 01:53:30 +02:00
Peter Dimov
aca46fae91 Use __builtin_clz 2020-12-29 01:28:59 +02:00
Peter Dimov
409c809cd8 Add popcount 2020-12-29 01:06:22 +02:00
Peter Dimov
26728848b4 Add bit_ceil 2020-12-29 00:29:44 +02:00
Peter Dimov
cc877e6b5b Add countl_zero, countl_one 2020-12-28 23:40:59 +02:00
Peter Dimov
a47eebf41a Add countr_zero, countr_one 2020-12-28 21:52:02 +02:00
Peter Dimov
045487ba96 Add boost/core/bit.hpp (bit_cast, rotl, rotr) 2020-12-28 21:12:22 +02:00