diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-03-02 19:39:13 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-03-03 22:35:34 -0500 |
commit | 05779e2c89e06d09a6b685797e87723f7906a5ce (patch) | |
tree | 8fae04431c834ede3aa8d0c7e77a6525bb2274bf /gcc | |
parent | 7f327e8765c25552a1a6ae7d8747f74786f243dd (diff) | |
download | gcc-05779e2c89e06d09a6b685797e87723f7906a5ce.zip gcc-05779e2c89e06d09a6b685797e87723f7906a5ce.tar.gz gcc-05779e2c89e06d09a6b685797e87723f7906a5ce.tar.bz2 |
libstdc++: Fix use of is_nothrow_assignable_v in <bits/ranges_uninitialized.h>
We are passing a value type as the first argument to is_nothrow_assignable_v,
but the result of that is inevitably false. Since this predicate is a part of
the condition that guards the corresponding optimizations for these algorithms,
this bug means these optimizations are never used. We should be passing a
reference type to is_nothrow_assignable_v instead.
libstdc++-v3/ChangeLog:
* include/bits/ranges_uninitialized.h
(uninitialized_copy_fn::operator()): Pass a reference type as the first
argument to is_nothrow_assignable_v.
(uninitialized_copy_fn::operator()): Likewise.
(uninitialized_move_fn::operator()): Likewise. Return an in_out_result
with the input iterator stripped of its move_iterator.
(uninitialized_move_n_fn::operator()): Likewise.
(uninitialized_fill_fn::operator()): Pass a reference type as the first
argument to is_nothrow_assignable_v.
(uninitialized_fill_n_fn::operator()): Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions