diff mbox series

[committed] libstdc++: Improve Doxygen docs for std::allocator_traits specializations

Message ID 20240823210130.1036969-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Improve Doxygen docs for std::allocator_traits specializations | expand

Commit Message

Jonathan Wakely Aug. 23, 2024, 9:01 p.m. UTC
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 mbox series

Patch

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<typename _Tp>
     struct allocator_traits<allocator<_Tp>>
     {
@@ -720,7 +726,13 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       { return __rhs; }
     };
 
-  /// Explicit specialization for std::allocator<void>.
+  /**
+   * @brief  Explicit specialization for `std::allocator<void>`
+   * @headerfile memory
+   * @ingroup allocators
+   * @since C++11
+   * @see std::allocator_traits
+  */
   template<>
     struct allocator_traits<allocator<void>>
     {
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<typename _Alloc> 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<typename _Tp>
     struct allocator_traits<pmr::polymorphic_allocator<_Tp>>
     {