[PATCH][_GLIBCXX_DEBUG] Fix safe.base.h comments
François Dumont
frs.dumont@gmail.com
Mon Aug 31 16:38:11 GMT 2026
I initially planned to commit this directly as trivial but as I'm not a
Doxygen expert, maybe there is something better to do.
Without any feedback I plan to commit in a couple of days.
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.
Tested under Linux x86_64 _GLIBCXX_DEBUG mode just to check that comment
is still consider as such.
François
-------------- next part --------------
diff --git a/libstdc++-v3/include/debug/safe_base.h b/libstdc++-v3/include/debug/safe_base.h
index 25ac7a4e836..6ea499ef239 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;
};
More information about the Libstdc++
mailing list