Update documentation

This commit is contained in:
Peter Dimov 2023-05-31 02:29:32 +03:00
parent 06fef712c9
commit 350526f7c7
2 changed files with 19 additions and 1 deletions

View File

@ -33,6 +33,11 @@ namespace core
template<class To, class From>
To bit_cast(From const& from) noexcept;
// byteswap
template<class T>
constexpr T byteswap(T x) noexcept;
// Integral powers of 2
template<class T>
@ -102,6 +107,17 @@ constant expression context.
[endsect]
[section byteswap]
`template<class T> constexpr T byteswap(T x) noexcept;`
* *Requires:* `T` must be an integer type (i.e. one of `char`, `signed char`,
`unsigned char`, `short`, `unsigned short`, `int`, `unsigned int`, `long`,
`unsigned long`, `long long`, `unsigned long long`) without padding bits.
* *Returns:* `x` with the storage bytes reversed.
[endsect]
[section Integral powers of 2]
`template<class T> constexpr bool has_single_bit(T x) noexcept;`

View File

@ -9,9 +9,11 @@
[section Changes in 1.83.0]
* Add support for incomplete types to [link core.type_name `boost::core::type_name`].
* Added support for incomplete types to [link core.type_name `boost::core::type_name`].
* Bit manipulation functions in [link core.bit `boost/core/bit.hpp`] are now
`constexpr` on recent MSVC versions (VS2019 update 5 and later.)
* Added `boost::core::byteswap` (an implementation of `std::byteswap` from
C++23) to [link core.bit `boost/core/bit.hpp`].
[endsect]