aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-04-17 22:34:09 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-01 20:34:46 +0100
commit741c7350c08b0884689466867b6c9e711c7b109e (patch)
tree1b0c1a73481bc0fb4cabbed8d3d5ad96bbe8d35d /gcc
parent2a93d18da3bd79eb0be87f029eefc8b28bb66dec (diff)
downloadgcc-741c7350c08b0884689466867b6c9e711c7b109e.zip
gcc-741c7350c08b0884689466867b6c9e711c7b109e.tar.gz
gcc-741c7350c08b0884689466867b6c9e711c7b109e.tar.bz2
libstdc++: Implement std::clamp with std::min and std::max [PR 96733]
The compiler doesn't know about the precondition of std::clamp that (hi < lo) is false, and so can't optimize as well as we'd like. By using std::min and std::max we help the compiler. Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/96733 * include/bits/stl_algo.h (clamp): Use std::min and std::max.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions