[PATCH 05/10] libstdc++: Fix Doxygen grouping

Tomasz Kaminski tkaminsk@redhat.com
Thu Apr 2 08:13:30 GMT 2026


On Thu, Apr 2, 2026 at 12:01 AM Jonathan Wakely <jwakely@redhat.com> wrote:

> libstdc++-v3/ChangeLog:
>
>         * include/bits/ostream.h (operator<<): Do not include deleted
>         overloads in @{ group.
>         * include/bits/stl_queue.h (priority_queue): Add @{ group around
>         constructors.
>         * include/bits/unordered_map.h: Remove stray @{. Move #endif to
>         encompass @} that is within the #if group.
> ---
>
> Tested x86_64-linux, docs built with Doxygen 1.13.2 and 1.17.0 (from git)
>
LGTM. Some of the latter patches in series look as if they could be
committed directly.

>
>  libstdc++-v3/include/bits/ostream.h       | 4 ++--
>  libstdc++-v3/include/bits/stl_queue.h     | 7 ++++++-
>  libstdc++-v3/include/bits/unordered_map.h | 3 +--
>  3 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/libstdc++-v3/include/bits/ostream.h
> b/libstdc++-v3/include/bits/ostream.h
> index a637c433bf1b..7c53b21bdb3d 100644
> --- a/libstdc++-v3/include/bits/ostream.h
> +++ b/libstdc++-v3/include/bits/ostream.h
> @@ -657,6 +657,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      inline basic_ostream<char, _Traits>&
>      operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
>      { return (__out << static_cast<char>(__c)); }
> +  ///@}
>
>  #if __cplusplus > 201703L
>    // The following deleted overloads prevent formatting character values
> as
> @@ -696,7 +697,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete;
>  #endif // _GLIBCXX_USE_WCHAR_T
>  #endif // C++20
> -  ///@}
>
>    ///@{
>    /**
> @@ -751,6 +751,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      inline basic_ostream<char, _Traits> &
>      operator<<(basic_ostream<char, _Traits>& __out, const unsigned char*
> __s)
>      { return (__out << reinterpret_cast<const char*>(__s)); }
> +  ///@}
>
>  #if __cplusplus > 201703L
>     // The following deleted overloads prevent formatting strings as
> @@ -790,7 +791,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>      operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) =
> delete;
>  #endif // _GLIBCXX_USE_WCHAR_T
>  #endif // C++20
> -  ///@}
>
>  #if __cplusplus >= 201103L
>    // C++11 27.7.3.9 Rvalue stream insertion [ostream.rvalue]
> diff --git a/libstdc++-v3/include/bits/stl_queue.h
> b/libstdc++-v3/include/bits/stl_queue.h
> index 48bd0ebed634..5dc846e13e16 100644
> --- a/libstdc++-v3/include/bits/stl_queue.h
> +++ b/libstdc++-v3/include/bits/stl_queue.h
> @@ -685,6 +685,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>         *
>         *  For more information on function objects, see the
>         *  documentation on @link functors functor base classes@endlink.
> +       *
> +       *  @{
>         */
>  #if __cplusplus < 201103L
>        template<typename _InputIterator>
> @@ -730,7 +732,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>           c.insert(c.end(), __first, __last);
>           std::make_heap(c.begin(), c.end(), comp);
>         }
> +#endif // C++11
> +      /// @}
>
> +#if __cplusplus >= 201103L
>        // _GLIBCXX_RESOLVE_LIB_DEFECTS
>        // 3506. Missing allocator-extended constructors for priority_queue
>        template<typename _InputIterator, typename _Alloc,
> @@ -773,7 +778,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>           c.insert(c.end(), __first, __last);
>           std::make_heap(c.begin(), c.end(), comp);
>         }
> -#endif
> +#endif // C++11
>
>  #if __glibcxx_containers_ranges // C++ >= 23
>        /**
> diff --git a/libstdc++-v3/include/bits/unordered_map.h
> b/libstdc++-v3/include/bits/unordered_map.h
> index 229179933f3b..853386e9f9bc 100644
> --- a/libstdc++-v3/include/bits/unordered_map.h
> +++ b/libstdc++-v3/include/bits/unordered_map.h
> @@ -456,7 +456,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
>         emplace(_Args&&... __args)
>         { return _M_h.emplace(std::forward<_Args>(__args)...); }
>
> -      ///@{
>        /**
>         *  @brief Attempts to build and insert a std::pair into the
>         *  %unordered_map.
> @@ -617,7 +616,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
>           return _M_h.try_emplace(__hint, std::move(__k),
>                                   std::forward<_Args>(__args)...).first;
>         }
> -#endif // __glibcxx_unordered_map_try_emplace
>
>  #ifdef __glibcxx_associative_heterogeneous_insertion  // C++26
>        template <__heterogeneous_hash_key<unordered_map> _Kt, typename
> ..._Args>
> @@ -629,6 +627,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
>         }
>  #endif
>        ///@}
> +#endif // __glibcxx_unordered_map_try_emplace
>
>        ///@{
>        /**
> --
> 2.53.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20260402/67dfac99/attachment.htm>


More information about the Libstdc++ mailing list