https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119135

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>:

https://gcc.gnu.org/g:50359c0a44381edb6dbd9359ef2ebdadbcc3ed42

commit r15-8030-g50359c0a44381edb6dbd9359ef2ebdadbcc3ed42
Author: Patrick Palka <ppa...@redhat.com>
Date:   Thu Mar 13 09:15:21 2025 -0400

    libstdc++: Fix ref_view branch of views::as_const [PR119135]

    Unlike for span<X> and empty_view<X>, the range_reference_t of
    ref_view<X> doesn't correspond to X.  This patch fixes the ref_view
    branch of views::as_const to correctly query its underlying range
    type X.

            PR libstdc++/119135

    libstdc++-v3/ChangeLog:

            * include/std/ranges: Include <utility>.
            (views::__detail::__is_ref_view): Replace with ...
            (views::__detail::__is_constable_ref_view): ... this.
            (views::_AsConst::operator()): Replace bogus use of element_type
            in the ref_view branch.
            * testsuite/std/ranges/adaptors/as_const/1.cc (test03): Extend
            test.

    Reviewed-by: Tomasz KamiÅski <tkami...@redhat.com>
    Reviewed-by: Jonathan Wakely <jwak...@redhat.com>

Reply via email to