diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-02-17 13:20:57 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-02-17 13:20:57 +0000 |
commit | 98cf2c265962e260f2f95617983915c754f446ea (patch) | |
tree | d6a289228989f60b777a58d6ee657070bc0702f3 /gcc/tree-ssa.c | |
parent | 5e2dae50d2dced9896048e036e2c8bebfc65472c (diff) | |
download | gcc-98cf2c265962e260f2f95617983915c754f446ea.zip gcc-98cf2c265962e260f2f95617983915c754f446ea.tar.gz gcc-98cf2c265962e260f2f95617983915c754f446ea.tar.bz2 |
libstdc++: Implement "Safe Integral Comparisons" (P0586R2)
* include/std/type_traits (__is_standard_integer): New helper trait.
* include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
(cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
* include/std/version (__cpp_lib_integer_comparison_functions): Define.
* testsuite/20_util/integer_comparisons/1.cc: New test.
* testsuite/20_util/integer_comparisons/2.cc: New test.
* testsuite/20_util/integer_comparisons/equal.cc: New test.
* testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
* testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
* testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
* testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
* testsuite/20_util/integer_comparisons/in_range.cc: New test.
* testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
* testsuite/20_util/integer_comparisons/less.cc: New test.
* testsuite/20_util/integer_comparisons/less_equal.cc: New test.
* testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
* testsuite/20_util/integer_comparisons/less_neg.cc: New test.
* testsuite/20_util/integer_comparisons/not_equal.cc: New test.
* testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
Diffstat (limited to 'gcc/tree-ssa.c')
0 files changed, 0 insertions, 0 deletions