[PATCH] libstdc++: Add typedefs to __gnu_test::test_container utility

Tomasz Kaminski tkaminsk@redhat.com
Mon Oct 27 08:12:13 GMT 2025


On Fri, Oct 24, 2025 at 8:01 PM Jonathan Wakely <jwakely@redhat.com> wrote:

> libstdc++-v3/ChangeLog:
>
>         * testsuite/util/testsuite_iterators.h (test_container): Add
>         iterator and value_type typedefs.
> ---
>
> I wanted to use test_container::value_type in a new test I was writing,
> and though it would be worth adding independently of the new test.
>
> Tested powerpc64le-linux.
>
LGTM

>
>  libstdc++-v3/testsuite/util/testsuite_iterators.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h
> b/libstdc++-v3/testsuite/util/testsuite_iterators.h
> index 5bf2e704e843..41fbcaad366a 100644
> --- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
> +++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
> @@ -674,6 +674,9 @@ namespace __gnu_test
>    template <class T, template<class TT> class ItType>
>    struct test_container
>    {
> +    typedef ItType<T> iterator;
> +    typedef typename iterator::value_type value_type;
> +
>      typename ItType<T>::ContainerType bounds;
>
>      _GLIBCXX_CONSTEXPR
> --
> 2.51.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20251027/f70a539a/attachment.htm>


More information about the Libstdc++ mailing list