From patchwork Fri Aug 23 21:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1976289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BurooFCh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrCDt664Cz1yXY for ; Sat, 24 Aug 2024 07:02:06 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 541AF3861030 for ; Fri, 23 Aug 2024 21:02:04 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id AEC0A3861035 for ; Fri, 23 Aug 2024 21:01:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEC0A3861035 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AEC0A3861035 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724446898; cv=none; b=ufxnTOP9nvcGxKgkUtq778LWxUN1lUYIbJr27SkOf+O19RF9DVSucyt5mNPY9iEKEBT0KA1m8Yg934fsOY/g4k4SnbndfNRjG+YoiRsU+Cudn3lnvKN0WHs35uz+kO72DGcWZ2sx1xfwUzWaaG2vxuoWw/KBG93ZA590NJZBo7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724446898; c=relaxed/simple; bh=CDUwoaE1R0kG3qBgSWf0dsYYD6wdTxcjTtCwxJfM9xw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Fxzrkpdo5K0IO3RceVC2rwHlxMS3jUCcYe2tb3lO5zfRVku/oruOl9n8Dn4ZgmtoGdKXwCowmy92uoMUYMUZ64tkYknmlv6l3bEtKxgAQvtefb9x/45arEqOxwzlJBPCOQzCoiGgwKU+NIEqeufwXwJLUf/saW9+JsnG+bHZq/0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724446896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qx9iViAOj9FLZVA6T1+w3s30okXbMA2meiyT1lG2Wv4=; b=BurooFChsF3IcheXaxbQkNU5H/fDTZt7qxE7eYuhzC7LKLTi+KUt93X4cynqMmGaCGz2eI Nk5Uz4ewVWpdFfH1sp8JABxO52vWml81jOzeqJiSEAPNuG+NEimCTuHoweMcVt4OB5GvJL GOQ0YoHklzu1gn0+LG4ecWdOuRM+7w8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-12-veD2TXLMOh61j0o6GbbwzQ-1; Fri, 23 Aug 2024 17:01:33 -0400 X-MC-Unique: veD2TXLMOh61j0o6GbbwzQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2961B19560B4; Fri, 23 Aug 2024 21:01:32 +0000 (UTC) Received: from localhost (unknown [10.42.28.41]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9AE7C1955E8C; Fri, 23 Aug 2024 21:01:31 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Improve Doxygen docs for std::allocator_traits specializations Date: Fri, 23 Aug 2024 22:01:15 +0100 Message-ID: <20240823210130.1036969-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.5 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, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Pushed to trunk. -- >8 -- The main fix here is to use @header so that the docs show the correct header file instead of an internal header like alloc_traits.h. libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h: Improve doxygen docs for allocator_traits specializations. * include/bits/memory_resource.h: Likewise. --- libstdc++-v3/include/bits/alloc_traits.h | 16 ++++++++++++++-- libstdc++-v3/include/bits/memory_resource.h | 9 +++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h index c2acc2ab207..c64f4757d5d 100644 --- a/libstdc++-v3/include/bits/alloc_traits.h +++ b/libstdc++-v3/include/bits/alloc_traits.h @@ -549,7 +549,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #pragma GCC diagnostic pop #if _GLIBCXX_HOSTED - /// Partial specialization for std::allocator. + /** + * @brief Partial specialization for `std::allocator` + * @headerfile memory + * @ingroup allocators + * @since C++11 + * @see std::allocator_traits + */ template struct allocator_traits> { @@ -720,7 +726,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __rhs; } }; - /// Explicit specialization for std::allocator. + /** + * @brief Explicit specialization for `std::allocator` + * @headerfile memory + * @ingroup allocators + * @since C++11 + * @see std::allocator_traits + */ template<> struct allocator_traits> { diff --git a/libstdc++-v3/include/bits/memory_resource.h b/libstdc++-v3/include/bits/memory_resource.h index 5f50b296df7..db515fb30ef 100644 --- a/libstdc++-v3/include/bits/memory_resource.h +++ b/libstdc++-v3/include/bits/memory_resource.h @@ -52,7 +52,7 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace pmr { - /// Class memory_resource + /// Class `memory_resource` /** * @ingroup pmr * @headerfile memory_resource @@ -385,7 +385,12 @@ namespace pmr template struct allocator_traits; - /// Partial specialization for std::pmr::polymorphic_allocator + /// Partial specialization for `std::pmr::polymorphic_allocator` + /** + * @ingroup pmr + * @headerfile memory_resource + * @since C++17 + */ template struct allocator_traits> {