From 350526f7c721ecd866420d9239d73eb43fafa741 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 31 May 2023 02:29:32 +0300 Subject: [PATCH] Update documentation --- doc/bit.qbk | 16 ++++++++++++++++ doc/changes.qbk | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/bit.qbk b/doc/bit.qbk index 81b9536..b0a5750 100644 --- a/doc/bit.qbk +++ b/doc/bit.qbk @@ -33,6 +33,11 @@ namespace core template To bit_cast(From const& from) noexcept; +// byteswap + +template +constexpr T byteswap(T x) noexcept; + // Integral powers of 2 template @@ -102,6 +107,17 @@ constant expression context. [endsect] +[section byteswap] + +`template 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 constexpr bool has_single_bit(T x) noexcept;` diff --git a/doc/changes.qbk b/doc/changes.qbk index 1e5639e..15b103c 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -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]