[libcxx-commits] [libcxx] [libc++][ranges] LWG3610: `iota_view::size` sometimes rejects integer-class types (PR #155169)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 25 01:22:38 PDT 2025


H-G-Hristov wrote:

> > > I wondering that whether we treat `__int128` as an extended integer type or an integer-class type. Also, I guess we should also cover `_BitInt(N)`, see also #74161.
> > > It seems to me that criteria for integer-class types are not very clear. CC @cjdb @ldionne.
> > 
> > 
> > integer-like types bigger than `long long` aren't supported by `iota_view`:
> > https://github.com/llvm/llvm-project/blob/44284cde6d74a8c0a849f9f30feb23a37a796820/libcxx/include/__ranges/iota_view.h#L64
> 
> Oh... Then we also need to test using integer-class type as the `_BoundSentinel` type while the `_Start` type is an integer type.
> 
> (And if we want to properly support extended integer types, the restriction should be relaxed.)

For the record: there was mentioning of supporting `__int128_t` in the original PR:
https://reviews.llvm.org/D107396?id=366123#inline-1028560
https://reviews.llvm.org/D107396?id=365533#inline-1026761
Would this patch be the appropriate place also to try to do the update to support `_int128_t`?

https://github.com/llvm/llvm-project/pull/155169


More information about the libcxx-commits mailing list