aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-02-09 13:37:43 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-02-09 13:37:43 +0000
commitdcda050e6c3c3726cb14109674053f83cae330be (patch)
tree57f505992990d92e97d0e99617c3f7cf7c7227b6 /gcc
parent81958cd6adf402a85dc7d21b43caac56fba0af21 (diff)
downloadgcc-dcda050e6c3c3726cb14109674053f83cae330be.zip
gcc-dcda050e6c3c3726cb14109674053f83cae330be.tar.gz
gcc-dcda050e6c3c3726cb14109674053f83cae330be.tar.bz2
libstdc++: Fix BUILTIN-PTR-CMP helpers
The helpers that implement BUILTIN-PTR-CMP do not currently check if the arguments are actually comparable, so the concept is true when it shouldn't be. Since we're trying to test for an unambiguous conversion to pointers, we can also require that it returns bool, because the built-in comparisons for pointers do return bool. * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require equality comparison to be valid and return bool. (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison. * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check type with ambiguous conversion to fundamental types. * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions