https://gcc.gnu.org/g:f8a30de08d21d33597703fc9ce7d13e98b7c9886

commit r17-3885-gf8a30de08d21d33597703fc9ce7d13e98b7c9886
Author: François Dumont <[email protected]>
Date:   Mon Aug 31 06:33:43 2026 +0200

    libstdc++: [_GLIBCXX_DEBUG] Fix safe.base.h comments
    
    'Likewise' was used to start the documentation of some methods. This is bad
    practice because in one case the method had been moved and so was not 
anymore
    next to the other method this 'likewise' was referring to. And more 
generally,
    when documentation is consulted through the Doxygen generated files, the
    'Likewise' is then not referring to any meaningful context.
    
    'Likewise' is replaced by 'Like <method-name>'.
    
    libstdc++-v3/ChangeLog:
    
            * include/debug/safe_base.h
            (_Safe_iterator_base::_M_attach_single): Adapt comment to refer to 
_M_attach.
            (_Safe_iterator_base::_M_detach): Fix comment typo.
            (_Safe_iterator_base::_M_detach_single): Adapt comment to refer to 
_M_detach.
            (_Safe_sequence_base::_M_attach_single): Adapt comment to refer to 
_M_attach.
            (_Safe_sequence_base::_M_detach_single): Adapt comment to refer to 
_M_detach.

Diff:
---
 libstdc++-v3/include/debug/safe_base.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/include/debug/safe_base.h 
b/libstdc++-v3/include/debug/safe_base.h
index 25ac7a4e836f..6ea499ef2395 100644
--- a/libstdc++-v3/include/debug/safe_base.h
+++ b/libstdc++-v3/include/debug/safe_base.h
@@ -127,12 +127,12 @@ namespace __gnu_debug
     void
     _M_attach(const _Safe_sequence_base* __seq, bool __constant);
 
-    /** Likewise, but not thread-safe. */
+    /** Like _M_attach but not thread-safe. */
     void
     _M_attach_single(const _Safe_sequence_base* __seq,
                     bool __constant) _GLIBCXX_USE_NOEXCEPT;
 
-    /** Detach the iterator for whatever sequence it is attached to,
+    /** Detach the iterator from whatever sequence it is attached to,
      * if any.
     */
     void
@@ -152,7 +152,7 @@ namespace __gnu_debug
 #endif
 
   public:
-    /** Likewise, but not thread-safe. */
+    /** Like _M_detach but not thread-safe. */
     void
     _M_detach_single() _GLIBCXX_USE_NOEXCEPT;
 
@@ -339,7 +339,7 @@ namespace __gnu_debug
     void
     _M_attach(_Safe_iterator_base* __it, bool __constant) const;
 
-    /** Likewise but not thread safe. */
+    /** Like _M_attach but not thread-safe. */
     void
     _M_attach_single(_Safe_iterator_base* __it,
                     bool __constant) const _GLIBCXX_USE_NOEXCEPT;
@@ -348,7 +348,7 @@ namespace __gnu_debug
     void
     _M_detach(_Safe_iterator_base* __it) const;
 
-    /** Likewise but not thread safe. */
+    /** Like _M_detach but not thread-safe. */
     void
     _M_detach_single(_Safe_iterator_base* __it) const _GLIBCXX_USE_NOEXCEPT;
   };

Reply via email to