]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Improve Doxygen docs for std::allocator_traits specializations
authorJonathan Wakely <jwakely@redhat.com>
Fri, 23 Aug 2024 20:54:21 +0000 (21:54 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 9 Jan 2025 23:52:33 +0000 (23:52 +0000)
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.

(cherry picked from commit cd8e0ea7273425931a0843f4355ad61e177e1bf2)

libstdc++-v3/include/bits/alloc_traits.h
libstdc++-v3/include/bits/memory_resource.h

index a81b286eee7006bb72d5b584cb41e5497c0e550b..9d55a191288521d5e4027c96a8358daf9db77864 100644 (file)
@@ -450,7 +450,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>>
     {
@@ -621,7 +627,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>>
     {
index 5f50b296df7b056fd16eb595981eccf4db5ec71d..db515fb30ef93550184b542c1a8c8a3f77030f26 100644 (file)
@@ -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>>
     {