Open jeffhammond opened 3 years ago
I would expect that to work.
NVIDIA/thrust#1491 updated thrust::iterator_traits
to support more types, this may address the issue since thrust::distance
requires a valid specialization of those traits.
However, from your slack message, this also fails with std::distance
so there may be more at play.
I believe this is a bug in totally fine by libstdc++
They are differentiating their implementation based on iterator_category
which does not make sense for iota_view with ptrdiff_t
as input type (This is because we need __int128
as a difference type there and that breaks some of the usual machinery)
One can see this nicely here: https://godbolt.org/z/Yo86zE4K4
Long story short. Both thrust and libstc++ are perfectly conforming in their implementation. It is just a bad user experience that old machinery does not support new iterator types.
Is it unreasonable for me to expect this to work?
error
thrust-ranges.cc
Note that the type of
Index_type
doesn't matter. The same error occurs if I#define
it toint
.