From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2D9243857404; Fri, 25 Mar 2022 20:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D9243857404 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-7819] libstdc++: Add more doxygen comments in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 3ab5c8cd03d92bf4ec41e351820349d92fbc40c4 X-Git-Newrev: 674ec679059bca34099618b1987287b60ab12029 Message-Id: <20220325202155.2D9243857404@sourceware.org> Date: Fri, 25 Mar 2022 20:21:55 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2022 20:21:55 -0000 https://gcc.gnu.org/g:674ec679059bca34099618b1987287b60ab12029 commit r12-7819-g674ec679059bca34099618b1987287b60ab12029 Author: Jonathan Wakely Date: Wed Mar 23 12:16:25 2022 +0000 libstdc++: Add more doxygen comments in libstdc++-v3/ChangeLog: * include/std/bit (bit_cast, byteswap, endian): Add doxygen comments. Diff: --- libstdc++-v3/include/std/bit | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit index a40f1ce99df..ef19d649e32 100644 --- a/libstdc++-v3/include/std/bit +++ b/libstdc++-v3/include/std/bit @@ -69,6 +69,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_bit_cast 201806L /// Create a value of type `To` from the bits of `from`. + /** + * @tparam _To A trivially-copyable type. + * @param __from A trivially-copyable object of the same size as `_To`. + * @return An object of type `_To`. + * @since C++20 + */ template [[nodiscard]] constexpr _To @@ -86,6 +92,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_byteswap 202110L /// Reverse order of bytes in the object representation of `value`. + /** + * @tparam _Tp An integral type. + * @param __value An object of integer type. + * @return An object of the same type, with the bytes reversed. + * @since C++23 + */ template [[nodiscard]] constexpr enable_if_t::value, _Tp> @@ -444,7 +456,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #define __cpp_lib_endian 201907L - /// Byte order + /// Byte order constants + /** + * The platform endianness can be checked by comparing `std::endian::native` + * to one of `std::endian::big` or `std::endian::little`. + * + * @since C++20 + */ enum class endian { little = __ORDER_LITTLE_ENDIAN__,