]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Use std::addressof in ranges::uninitialized_xxx [PR101571]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 22 Jul 2021 13:37:24 +0000 (14:37 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 26 Nov 2021 16:31:46 +0000 (16:31 +0000)
commit0d480b8403f2541402adeed82deb7eb028330b87
tree260b5928450473f65421adb2982a0c14aa6e25bd
parent30033d9bb9d5e5303fadf448999f4f27e2693ed6
libstdc++: Use std::addressof in ranges::uninitialized_xxx [PR101571]

Make the ranges::uninitialized_xxx algorithms use std::addressof to
protect against iterator types that overload operator&.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101571
* include/bits/ranges_uninitialized.h (_DestroyGuard): Change
constructor parameter to reference and use addressof.
* testsuite/util/testsuite_iterators.h: Define deleted operator&
overloads for test iterators.

(cherry picked from commit aca7a0253d6e3116f846ad530b19d89644a64267)
libstdc++-v3/include/bits/ranges_uninitialized.h
libstdc++-v3/testsuite/util/testsuite_iterators.h
This page took 0.060824 seconds and 6 git commands to generate.