libstdc++: Make incrementable<__int128> satisfied in strict mode
authorJonathan Wakely <jwakely@redhat.com>
Thu, 20 Aug 2020 18:41:15 +0000 (19:41 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 20 Aug 2020 18:42:02 +0000 (19:42 +0100)
commit5e9ad288eb6fb366142b166e7985d16727b398e1
tree1e33902007eeb2e36356927ce6de9ddef61e2deb
parent300ef2fcc10e98359d14654be23bbb84a5d141e1
libstdc++: Make incrementable<__int128> satisfied in strict mode

This adds specializations of std::incrementable_traits so that 128-bit
integers are always considered incrementable (and therefore usable with
std::ranges::iota_view) even when they don't satisfy std::integral.

libstdc++-v3/ChangeLog:

* include/bits/iterator_concepts.h [__STRICT_ANSI__]
(incrementable_traits<__int128>): Define specialization.
(incrementable_traits<unsigned __int128>): Likewise.
* testsuite/std/ranges/iota/96042.cc: Test iota_view with
__int128.
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/testsuite/std/ranges/iota/96042.cc