aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-08-19 09:12:55 -0400
committerPatrick Palka <ppalka@redhat.com>2020-08-19 09:12:55 -0400
commite6c76f0d3327bf00c96f5a63961c1d5ab77512db (patch)
treed91a89b40462a25485f34df68cbb15c424feca24 /gcc
parent708b3600d043e5885ed25464189a88590feeaac9 (diff)
downloadgcc-e6c76f0d3327bf00c96f5a63961c1d5ab77512db.zip
gcc-e6c76f0d3327bf00c96f5a63961c1d5ab77512db.tar.gz
gcc-e6c76f0d3327bf00c96f5a63961c1d5ab77512db.tar.bz2
libstdc++: integer-class types as per [iterator.concept.winc]
This implements signed and unsigned integer-class types, whose width is one bit larger than the widest supported signed and unsigned integral type respectively. In our case this is either __int128 and unsigned __int128, or long long and unsigned long long. Internally, the two integer-class types are represented as a largest supported unsigned integral type plus one extra bit. The signed integer-class type is represented in two's complement form with the extra bit acting as the sign bit. libstdc++-v3/ChangeLog: * include/Makefile.am (bits_headers): Add new header <bits/max_size_type.h>. * include/Makefile.in: Regenerate. * include/bits/iterator_concepts.h (ranges::__detail::__max_diff_type): Remove definition, replace with forward declaration of class __max_diff_type. (__detail::__max_size_type): Remove definition, replace with forward declaration of class __max_size_type. (__detail::__is_unsigned_int128, __is_signed_int128) (__is_int128): New concepts. (__detail::__is_integer_like): Accept __int128 and unsigned __int128. (__detail::__is_signed_integer_like): Accept __int128. * include/bits/max_size_type.h: New header. * include/bits/range_access.h: Include <bits/max_size_type.h>. (__detail::__to_unsigned_like): Two new overloads. * testsuite/std/ranges/iota/difference_type.cc: New test. * testsuite/std/ranges/iota/max_size_type.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions