]> git.ipfire.org Git - thirdparty/gcc.git/commit
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, 12 Nov 2020 14:13:08 +0000 (14:13 +0000)
commit9d6136020285b3acc8a3f60a680afd491e5824ef
treef5a3e05f5da6f559358bcb2728ed4800f426848c
parenta65261443a9b9cfac876c0b7e47393587eb1ce5c
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.

(cherry picked from commit 5e9ad288eb6fb366142b166e7985d16727b398e1)
libstdc++-v3/include/bits/iterator_concepts.h
libstdc++-v3/testsuite/std/ranges/iota/96042.cc