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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:8836c35d5d6fefa514cb78cb6800670869fb1df2

commit r10-8135-g8836c35d5d6fefa514cb78cb6800670869fb1df2
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Tue May 12 09:54:24 2020 +0100

    libstdc++: Make byte-sized std::fill_n a constant expression (PR 94933)

    The overload for byte types uses memset and isn't constexpr. This adds
    the specifier and uses std::is_constant_evaluated() to provide a
    compile-time alternative.

    Backport from mainline
    2020-05-03  Jonathan Wakely  <jwak...@redhat.com>

            PR libstdc++/94933
            * include/bits/stl_algobase.h (__fill_a1): Make overload for byte
types
            usable in constant expressions.
            * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
            non-scalars.

Reply via email to