Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

transform to ostream_iterator fails #366

Closed
jaredhoberock opened this issue Apr 30, 2013 · 2 comments
Closed

transform to ostream_iterator fails #366

jaredhoberock opened this issue Apr 30, 2013 · 2 comments
Labels
thrust type: bug: functional Does not work as intended.

Comments

@jaredhoberock
Copy link
Contributor

Reported here:

https://groups.google.com/forum/?hl=en&fromgroups=#!topic/thrust-users/RBjsMXImDxI

@jaredhoberock
Copy link
Contributor Author

One way to fix this might be to create a new type output_iterator_adaptor or somesuch which would provide a dummy reference typedef for output iterators who don't have one (or whose reference type is void, like std::ostream_iterator).

@jaredhoberock jaredhoberock modified the milestones: Future release, Release1.8 Jul 16, 2014
@jaredhoberock
Copy link
Contributor Author

We could properly fix this with c++11. The idea would be for zip_iterator::operator*() to return a tuple of whatever the constituent iterators return, instead of tuple<iterator_reference<Iterator>::type...>.

The idea would be to first check to see if iterator_reference<Iterator> is reasonable. If it is, return it. If not (e.g., if it is void or does not exist), use the result of Iterator::operator*.

@jaredhoberock jaredhoberock modified the milestones: C++11, Future release Jul 16, 2014
@brycelelbach brycelelbach removed this from the Next Next Release milestone Feb 24, 2020
@jrhemstad jrhemstad closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
thrust type: bug: functional Does not work as intended.
Projects
Archived in project
Development

No branches or pull requests

3 participants