Re: [committed] libstdc++: Fix range access for empty std::valarray [PR103022]

2021-11-05 Thread Jonathan Wakely via Gcc-patches
On Mon, 1 Nov 2021 at 13:27, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested powerpc64le-linux, pushed to trunk. > > > The std::begin and std::end overloads for std::valarray are defined in > terms of std::addressof(v[0]) which is undefined for an empty valarray. > > libstdc

[committed] libstdc++: Fix range access for empty std::valarray [PR103022]

2021-11-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. The std::begin and std::end overloads for std::valarray are defined in terms of std::addressof(v[0]) which is undefined for an empty valarray. libstdc++-v3/ChangeLog: PR libstdc++/103022 * include/std/valarray (begin, end): Do not deref