{"action":"closed","issue":{"url":"https://api.github.com/repos/ericniebler/range-v3/issues/85","labels_url":"https://api.github.com/repos/ericniebler/range-v3/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/ericniebler/range-v3/issues/85/comments","events_url":"https://api.github.com/repos/ericniebler/range-v3/issues/85/events","html_url":"https://github.com/ericniebler/range-v3/issues/85","id":51890777,"number":85,"title":"Handle proxy iterators","user":{"login":"sbabbi","id":1755506,"avatar_url":"https://avatars.githubusercontent.com/u/1755506?v=3","gravatar_id":"","url":"https://api.github.com/users/sbabbi","html_url":"https://github.com/sbabbi","followers_url":"https://api.github.com/users/sbabbi/followers","following_url":"https://api.github.com/users/sbabbi/following{/other_user}","gists_url":"https://api.github.com/users/sbabbi/gists{/gist_id}","starred_url":"https://api.github.com/users/sbabbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbabbi/subscriptions","organizations_url":"https://api.github.com/users/sbabbi/orgs","repos_url":"https://api.github.com/users/sbabbi/repos","events_url":"https://api.github.com/users/sbabbi/events{/privacy}","received_events_url":"https://api.github.com/users/sbabbi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ericniebler/range-v3/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-13T15:34:44Z","updated_at":"2015-01-05T16:54:28Z","closed_at":"2015-01-05T16:54:28Z","body":"One really nice feature would be to be able to sort (or applying any mutating algorithm, really), a `zip view`.\r\n\r\nExample:\r\n\r\n    int keys[] = {4,2,1,6};\r\n    int values[] = {1,2,3,4};\r\n    sort ( view::zip(keys, values) );\r\n\r\nAFAIK there is no easy way to do that in C++11, and it does not work with `range-v3` atm because sort expects a lvalue-ref to a range. \r\n\r\nIn general in the current standard the problem of implementing a `zip_iterator` with that semantics is that it `iterator::reference` must be `iterator::value_type&`. Having a `zip_iterator` whose `value type` is `tuple<Ts ... >` and `reference` is `tuple<Ts& ... >` is (I think) probably the desired semantics.\r\n\r\nEven then an overload of `swap( tuple<Ts & ...>, tuple <Ts & ...> )` that can swap two tuples of references passed *by value* would be necessary.\r\n\r\nJust random thoughts, apologies if this is has already been discussed."}}