From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E6BA93857404 for ; Fri, 25 Mar 2022 20:22:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6BA93857404 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-151-7WSZoty8N7uE9Y5yo9Rimg-1; Fri, 25 Mar 2022 16:22:09 -0400 X-MC-Unique: 7WSZoty8N7uE9Y5yo9Rimg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F31E4100BAAD; Fri, 25 Mar 2022 20:22:08 +0000 (UTC) Received: from localhost (unknown [10.33.36.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id BCB09401E96; Fri, 25 Mar 2022 20:22:08 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Add more doxygen comments in Date: Fri, 25 Mar 2022 20:22:08 +0000 Message-Id: <20220325202208.1239356-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2022 20:22:12 -0000 Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/bit (bit_cast, byteswap, endian): Add doxygen comments. --- 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__, -- 2.34.1