]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix errors in Doxygen markup
authorJonathan Wakely <jwakely@redhat.com>
Tue, 31 Mar 2026 15:00:41 +0000 (16:00 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 2 Apr 2026 12:59:55 +0000 (13:59 +0100)
libstdc++-v3/ChangeLog:

* doc/doxygen/doxygroups.cc: Define variable_templates group.
* include/bits/binders.h: Fix @file name.
* include/bits/formatfwd.h: Add missing @cond
* include/bits/forward_list.h: Add closing backtick in comment.
* include/bits/out_ptr.h (out_ptr, inout_ptr): Fix names in
@param comments.
* include/bits/regex_constants.h: Escape backtick in comment.
* include/bits/stl_map.h: Add missing @{.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_pair.h: Move declaration of complex into #if
group where it's used. Fix nesting of @cond and @endcond in #if
groups.
* include/std/functional: Move @cond inside #if group.
* include/std/type_traits: Likewise.
* libsupc++/exception: Fix typo'd backtick.

Reviewed-by: Tomasz KamiƄski <tkaminsk@redhat.com>
12 files changed:
libstdc++-v3/doc/doxygen/doxygroups.cc
libstdc++-v3/include/bits/binders.h
libstdc++-v3/include/bits/formatfwd.h
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/out_ptr.h
libstdc++-v3/include/bits/regex_constants.h
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/std/functional
libstdc++-v3/include/std/type_traits
libstdc++-v3/libsupc++/exception

index 27d4a5e20ba983c96a8715476cc4702be5e002b2..00d945ceba00dbb2f43ab65e3642e9ba07d5f579 100644 (file)
@@ -164,6 +164,21 @@ summarized in <a href="tables.html">tables</a>.  */
  * and condition variables.
  */
 
+/**
+ * @defgroup variable_templates Variable Templates
+ * @ingroup metaprogramming
+ * @since C++17
+ *
+ * Each trait in `<type_traits>` that has a `value` static data member is
+ * also available as a variable template, using the same name with a `_v`
+ * suffix. For example, `std::is_integral_v<T>` is a `bool` constant with
+ * the same value as `std::is_integral<T>::value`.
+ *
+ * In some cases, using the variable template instead of the `::value` member
+ * avoids instantiating the class template for the trait. This gives the
+ * compiler less work to do and can make your code compile a little faster.
+ */
+
 /**
  * @defgroup experimental Technical Specifications
  *
index 972471745bd4fc96cb5c0c14170a4502f6e3e7d1..51dba4cb446d43fb6b7c2bdef4c77d01081b07db 100644 (file)
@@ -23,7 +23,7 @@
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
-/** @file include/bits/binder.h
+/** @file include/bits/binders.h
  *  This is an internal header file, included by other library headers.
  *  Do not attempt to use it directly. @headername{functional}
  */
index d2dfb17492d189c2df960fe517a9ec97874e76b5..d28ca70b7d80c026a6cf9f32b448de03955a5a73 100644 (file)
@@ -56,6 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // [format.formatter], formatter
   template<typename _Tp, typename _CharT = char> struct formatter;
 
+/// @cond undocumented
 namespace __format
 {
 #ifdef _GLIBCXX_USE_WCHAR_T
index 025486646f3c15f4b44251cbc989e73953f20826..7b333b3b0b6e0cc455facdea9792e063a38a51db 100644 (file)
@@ -1461,7 +1461,7 @@ namespace __fwdlist
        *
        *  This function will insert copies of the data in the range
        *  `[ __first, __last)` into the %forward_list after the
-       *  location specified by `__pos.
+       *  location specified by `__pos`.
        *
        *  This operation is linear in the number of elements inserted and
        *  does not invalidate iterators and references.
index 48fe3475b2f76e2616e99dea7b1038ce463e98cd..cc5a8a3adacbce4f6b9443fbdf407bf26a8a1f85 100644 (file)
@@ -396,7 +396,7 @@ namespace __detail
   /**
    * @tparam _Pointer The type of pointer to convert to.
    * @param __s The pointer that should take ownership of the result.
-   * @param __args... Arguments to use when resetting the smart pointer.
+   * @param __args Pack of arguments to use when resetting the smart pointer.
    * @return A `std::out_ptr_t` referring to `__s`.
    * @since C++23
    * @headerfile <memory>
@@ -417,7 +417,7 @@ namespace __detail
   /**
    * @tparam _Pointer The type of pointer to convert to.
    * @param __s The pointer that should take ownership of the result.
-   * @param __args... Arguments to use when resetting the smart pointer.
+   * @param __args Pack of arguments to use when resetting the smart pointer.
    * @return A `std::inout_ptr_t` referring to `__s`.
    * @since C++23
    * @headerfile <memory>
index 32b9de1000b2a5182f570d468d6006e95712149b..e18f162196e369124e3ca1d5a9873badd7a17110 100644 (file)
@@ -335,9 +335,9 @@ namespace regex_constants
    * Format strings (from ECMA-262 [15.5.4.11]):
    * @li $$  The dollar-sign itself ($)
    * @li $&  The matched substring.
-   * @li $`  The portion of @a string that precedes the matched substring.
+   * @li $\`  The portion of the string that precedes the matched substring.
    *         This would be match_results::prefix().
-   * @li $'  The portion of @a string that follows the matched substring.
+   * @li $'  The portion of the string that follows the matched substring.
    *         This would be match_results::suffix().
    * @li $n  The nth capture, where n is in [1,9] and $n is not followed by a
    *         decimal digit.  If n <= match_results::size() and the nth capture
index 1e119a95b5cda02b036aa7bd1a63129dd36a2383..88a8faab9244c8dc3bfff29a5958326d64fdc8e3 100644 (file)
@@ -1096,6 +1096,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  is assigned from __obj.
        *
        *  Insertion requires logarithmic time.
+       *  @{
        */
       template <typename _Obj>
        pair<iterator, bool>
index efe6f72569ba3a6f178b0dea86c0f7715a054b04..aa49f87fc1377db91254a1c96384aa1123369df7 100644 (file)
@@ -101,9 +101,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<size_t...>
     struct _Index_tuple;
 
-  template<typename _Tp>
-    class complex;
-
   template<size_t _Int, class _Tp1, class _Tp2>
     constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&
     get(pair<_Tp1, _Tp2>& __in) noexcept;
@@ -153,6 +150,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     get(const array<_Tp, _Nm>&&) noexcept;
 
 #if __glibcxx_tuple_like >= 202311 // >= C++26
+  template<typename _Tp>
+    class complex;
+
   template<size_t _Int, typename _Tp>
     constexpr _Tp&
     get(complex<_Tp>&) noexcept;
@@ -233,8 +233,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
     };
 #endif // lib concepts
+  /// @endcond
 #endif // C++11
 
+  /// @cond undocumented
+
 #if __glibcxx_tuple_like // >= C++23
   template<typename _Tp>
     inline constexpr bool __is_tuple_v = false;
index 14825cc05acb6a902661fe61997f35a1a0284c90..ce35e28cde789dcb67d17ac373c26426d8418c56 100644 (file)
@@ -585,6 +585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  to the first is returned.
        *
        *  Insertion requires logarithmic time (if the hint is not taken).
+       *  @{
        */
       iterator
       insert(const_iterator __position, const value_type& __x)
index 314c0f6ac4a4e5fc90aedbba34d86592eabd9b55..91478d3e9fbe5a539526260b2034fe376afdf92a 100644 (file)
@@ -148,9 +148,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     }
 #endif // __cpp_lib_invoke_r
 
+#if __cplusplus >= 201103L
   /// @cond undocumented
 
-#if __cplusplus >= 201103L
   template<typename _MemFunPtr,
           bool __is_mem_fn = is_member_function_pointer<_MemFunPtr>::value>
     class _Mem_fn_base
index a7f881fe97367357a9ba0b25e0eea3084bb4816e..bba7a3fd03d2215ed2ea1c9459fcd53e97c2dd62 100644 (file)
@@ -2484,15 +2484,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     const size_t aligned_union<_Len, _Types...>::alignment_value;
 #pragma GCC diagnostic pop
 
-  /// @cond undocumented
-
+  // Decay trait for arrays and functions, used for perfect forwarding
+  // in make_pair, make_tuple, etc.
 #if _GLIBCXX_USE_BUILTIN_TRAIT(__decay)
   template<typename _Tp>
     struct decay
     { using type = __decay(_Tp); };
 #else
-  // Decay trait for arrays and functions, used for perfect forwarding
-  // in make_pair, make_tuple, etc.
+  /// @cond undocumented
+
   template<typename _Up>
     struct __decay_selector
     : __conditional_t<is_const<const _Up>::value, // false for functions
index 0ae01be25dd581f13fb029d91dc16e555b92413f..ab3e06da9f79d053f3e2756bdafc98f92d151214 100644 (file)
@@ -134,8 +134,8 @@ namespace std _GLIBCXX_VISIBILITY(default)
    *  stack unwinding [15.2].  end note]'
    *
    *  2: 'When `uncaught_exception()` is true, throwing an
-   *  %exception can result in a call of 1terminate()`
-   *  (15.5.1).'
+   *  %exception can result in a call of `terminate()`
+   *  (15.5.1).
    */
   _GLIBCXX17_DEPRECATED_SUGGEST("std::uncaught_exceptions()")
   bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));