diff mbox series

[committed] libstdc:: Use markdown for Doxygen comments in std::function

Message ID YSggGESwQkypYYtz@redhat.com
State New
Headers show
Series [committed] libstdc:: Use markdown for Doxygen comments in std::function | expand

Commit Message

Jonathan Wakely Aug. 26, 2021, 11:13 p.m. UTC
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* include/bits/std_function.h (function): Adjust doxygen
	comments.
	* include/bits/unique_ptr.h (make_unique_for_overwrite):
	Change parameter name to match doxygen comment.

Tested powerpc64le-linux. Committed to trunk.
commit 3a32a8ad7c7dba090cdde6d707fdfc4f4ba520d2
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Aug 26 16:55:31 2021

    libstdc:: Use markdown for Doxygen comments in std::function
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/std_function.h (function): Adjust doxygen
            comments.
            * include/bits/unique_ptr.h (make_unique_for_overwrite):
            Change parameter name to match doxygen comment.
diff mbox series

Patch

diff --git a/libstdc++-v3/include/bits/std_function.h b/libstdc++-v3/include/bits/std_function.h
index 8dfbd11f71e..82c932e0db5 100644
--- a/libstdc++-v3/include/bits/std_function.h
+++ b/libstdc++-v3/include/bits/std_function.h
@@ -456,16 +456,16 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	}
 
       /**
-       *  @brief %Function assignment operator.
+       *  @brief Function assignment operator.
        *  @param __x A %function with identical call signature.
-       *  @post @c (bool)*this == (bool)x
-       *  @returns @c *this
+       *  @post `(bool)*this == (bool)x`
+       *  @returns `*this`
        *
-       *  The target of @a __x is copied to @c *this. If @a __x has no
-       *  target, then @c *this will be empty.
+       *  The target of `__x` is copied to `*this`. If `__x` has no
+       *  target, then `*this` will be empty.
        *
-       *  If @a __x targets a function pointer or a reference to a function
-       *  object, then this operation will not throw an %exception.
+       *  If `__x` targets a function pointer or a reference to a function
+       *  object, then this operation will not throw an exception.
        */
       function&
       operator=(const function& __x)
@@ -475,15 +475,15 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
       /**
-       *  @brief %Function move-assignment operator.
+       *  @brief Function move-assignment operator.
        *  @param __x A %function rvalue with identical call signature.
-       *  @returns @c *this
+       *  @returns `*this`
        *
-       *  The target of @a __x is moved to @c *this. If @a __x has no
-       *  target, then @c *this will be empty.
+       *  The target of `__x` is moved to `*this`. If `__x` has no
+       *  target, then `*this` will be empty.
        *
-       *  If @a __x targets a function pointer or a reference to a function
-       *  object, then this operation will not throw an %exception.
+       *  If `__x` targets a function pointer or a reference to a function
+       *  object, then this operation will not throw an exception.
        */
       function&
       operator=(function&& __x) noexcept
@@ -493,11 +493,11 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
       /**
-       *  @brief %Function assignment to zero.
-       *  @post @c !(bool)*this
-       *  @returns @c *this
+       *  @brief Function assignment to empty.
+       *  @post `!(bool)*this`
+       *  @returns `*this`
        *
-       *  The target of @c *this is deallocated, leaving it empty.
+       *  The target of `*this` is deallocated, leaving it empty.
        */
       function&
       operator=(nullptr_t) noexcept
@@ -512,20 +512,21 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       }
 
       /**
-       *  @brief %Function assignment to a new target.
-       *  @param __f A %function object that is callable with parameters of
-       *  type @c T1, @c T2, ..., @c TN and returns a value convertible
-       *  to @c Res.
-       *  @return @c *this
+       *  @brief Function assignment to a new target.
+       *  @param __f  A function object that is callable with parameters of
+       *              type  `_ArgTypes...` and returns a value convertible
+       *              to `_Res`.
+       *  @return `*this`
+       *  @since C++11
        *
-       *  This  %function object wrapper will target a copy of @a
-       *  __f. If @a __f is @c reference_wrapper<F>, then this function
-       *  object will contain a reference to the function object @c
-       *  __f.get(). If @a __f is a NULL function pointer or NULL
-       *  pointer-to-member, @c this object will be empty.
+       *  This function object wrapper will target a copy of `__f`. If `__f`
+       *  is `reference_wrapper<F>`, then this function object will contain
+       *  a reference to the function object `__f.get()`. If `__f` is a null
+       *  function pointer or null pointer-to-member, this object will be
+       *  empty.
        *
-       *  If @a __f is a non-NULL function pointer or an object of type @c
-       *  reference_wrapper<F>, this function will not throw.
+       *  If `__f` is a non-null function pointer or an object of type
+       *  `reference_wrapper<F>`, this function will not throw.
        */
       template<typename _Functor>
 	_Requires<_Callable<_Functor>, function&>
@@ -551,8 +552,8 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *  @brief Swap the targets of two %function objects.
        *  @param __x A %function with identical call signature.
        *
-       *  Swap the targets of @c this function object and @a __f. This
-       *  function will not throw an %exception.
+       *  Swap the targets of `this` function object and `__f`.
+       *  This function will not throw exceptions.
        */
       void swap(function& __x) noexcept
       {
@@ -566,10 +567,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       /**
        *  @brief Determine if the %function wrapper has a target.
        *
-       *  @return @c true when this %function object contains a target,
-       *  or @c false when it is empty.
+       *  @return `true` when this function object contains a target,
+       *  or `false` when it is empty.
        *
-       *  This function will not throw an %exception.
+       *  This function will not throw exceptions.
        */
       explicit operator bool() const noexcept
       { return !_M_empty(); }
@@ -577,12 +578,12 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       // [3.7.2.4] function invocation
 
       /**
-       *  @brief Invokes the function targeted by @c *this.
+       *  @brief Invokes the function targeted by `*this`.
        *  @returns the result of the target.
-       *  @throws bad_function_call when @c !(bool)*this
+       *  @throws `bad_function_call` when `!(bool)*this`
        *
        *  The function call operator invokes the target function object
-       *  stored by @c this.
+       *  stored by `this`.
        */
       _Res
       operator()(_ArgTypes... __args) const
@@ -599,9 +600,9 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *  wrapper.
        *
        *  @returns the type identifier of the target function object, or
-       *  @c typeid(void) if @c !(bool)*this.
+       *  `typeid(void)` if `!(bool)*this`.
        *
-       *  This function will not throw an %exception.
+       *  This function will not throw exceptions.
        */
       const type_info&
       target_type() const noexcept
@@ -621,7 +622,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
        *  @brief Access the stored target function object.
        *
        *  @return Returns a pointer to the stored target function object,
-       *  if @c typeid(_Functor).equals(target_type()); otherwise, a null
+       *  if `typeid(_Functor).equals(target_type())`; otherwise, a null
        *  pointer.
        *
        * This function does not throw exceptions.
@@ -709,11 +710,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // [20.7.15.2.6] null pointer comparisons
 
   /**
-   *  @brief Compares a polymorphic function object wrapper against 0
-   *  (the NULL pointer).
-   *  @returns @c true if the wrapper has no target, @c false otherwise
+   *  @brief Test whether a polymorphic function object wrapper is empty.
+   *  @returns `true` if the wrapper has no target, `false` otherwise
    *
-   *  This function will not throw an %exception.
+   *  This function will not throw exceptions.
    */
   template<typename _Res, typename... _Args>
     inline bool
@@ -728,11 +728,10 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { return !static_cast<bool>(__f); }
 
   /**
-   *  @brief Compares a polymorphic function object wrapper against 0
-   *  (the NULL pointer).
-   *  @returns @c false if the wrapper has no target, @c true otherwise
+   *  @brief Test whether a polymorphic function object wrapper is non-empty.
+   *  @returns `false` if the wrapper has no target, `true` otherwise
    *
-   *  This function will not throw an %exception.
+   *  This function will not throw exceptions.
    */
   template<typename _Res, typename... _Args>
     inline bool
@@ -751,7 +750,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
   /**
    *  @brief Swap the targets of two polymorphic function object wrappers.
    *
-   *  This function will not throw an %exception.
+   *  This function will not throw exceptions.
    */
   // _GLIBCXX_RESOLVE_LIB_DEFECTS
   // 2062. Effect contradictions w/o no-throw guarantee of std::function swaps
diff --git a/libstdc++-v3/include/bits/unique_ptr.h b/libstdc++-v3/include/bits/unique_ptr.h
index f34ca10ce65..62ec1b52ecd 100644
--- a/libstdc++-v3/include/bits/unique_ptr.h
+++ b/libstdc++-v3/include/bits/unique_ptr.h
@@ -1027,8 +1027,8 @@  namespace __detail
    */
   template<typename _Tp>
     inline __detail::__unique_ptr_array_t<_Tp>
-    make_unique_for_overwrite(size_t __n)
-    { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__n]); }
+    make_unique_for_overwrite(size_t __num)
+    { return unique_ptr<_Tp>(new remove_extent_t<_Tp>[__num]); }
 
   /** Disable std::make_unique_for_overwrite for arrays of known bound.
    *  @tparam _Tp An array type of known bound, such as `U[N]`.