thrust
thrust copied to clipboard
Nested type detector fails for reference types
While debugging https://github.com/NVIDIA/thrust/issues/1588 I found that a transform_iterator with a reference result_type
would fail:
https://godbolt.org/z/o6aTaE8Tz
I traced this down to the fact that thrust::detail::has_result_type
fails with reference result_type
s:
https://godbolt.org/z/b1d8PMjbq
This stems from an implementation of a member type detector that won't work for references: https://github.com/NVIDIA/thrust/blob/d35f44f36fc4730605d39abdfac92f500ff44a55/thrust/detail/type_traits/has_nested_type.h#L21-L31
This member type detector implementation should be updated to be more general.