{"action":"created","issue":{"url":"https://api.github.com/repos/ericniebler/stl2/issues/78","labels_url":"https://api.github.com/repos/ericniebler/stl2/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/ericniebler/stl2/issues/78/comments","events_url":"https://api.github.com/repos/ericniebler/stl2/issues/78/events","html_url":"https://github.com/ericniebler/stl2/issues/78","id":98639352,"number":78,"title":"reverse_iterator","user":{"login":"CaseyCarter","id":456873,"avatar_url":"https://avatars.githubusercontent.com/u/456873?v=3","gravatar_id":"","url":"https://api.github.com/users/CaseyCarter","html_url":"https://github.com/CaseyCarter","followers_url":"https://api.github.com/users/CaseyCarter/followers","following_url":"https://api.github.com/users/CaseyCarter/following{/other_user}","gists_url":"https://api.github.com/users/CaseyCarter/gists{/gist_id}","starred_url":"https://api.github.com/users/CaseyCarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaseyCarter/subscriptions","organizations_url":"https://api.github.com/users/CaseyCarter/orgs","repos_url":"https://api.github.com/users/CaseyCarter/repos","events_url":"https://api.github.com/users/CaseyCarter/events{/privacy}","received_events_url":"https://api.github.com/users/CaseyCarter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-02T21:41:16Z","updated_at":"2015-08-02T22:16:45Z","closed_at":null,"body":"The binary operator declarations have a lot of redundant constraints that could be simplified:\r\n```\r\nEqualityComparable{I1, I2}\r\nbool operator==(const reverse_iterator<I1>& x,\r\n                const reverse_iterator<I2>& y);\r\n\r\nEqualityComparable{I1, I2}\r\nbool operator!=(const reverse_iterator<I1>& x,\r\n                const reverse_iterator<I2>& y);\r\n\r\nTotallyOrdered{I1, I2}\r\nbool operator<(const reverse_iterator<I1>& x,\r\n               const reverse_iterator<I2>& y);\r\n\r\nTotallyOrdered{I1, I2}\r\nbool operator>(const reverse_iterator<I1>& x,\r\n               const reverse_iterator<I2>& y);\r\n\r\nTotallyOrdered{I1, I2}\r\nbool operator<=(const reverse_iterator<I1>& x,\r\n                const reverse_iterator<I2>& y);\r\n\r\nTotallyOrdered{I1, I2}\r\nbool operator>=(const reverse_iterator<I1>& x,\r\n                const reverse_iterator<I2>& y);\r\n\r\nSizedIteratorRange{I2, I1}\r\nDifferenceType<I2> operator-(const reverse_iterator<I1>& x,\r\n                             const reverse_iterator<I2>& y);\r\n\r\ntemplate <class I>\r\nreverse_iterator<I> operator+(DifferenceType<I> n,\r\n                              const reverse_iterator<I>& x);\r\n```\r\nsince `reverse_iterator<T>` cannot be so much as referred to unless `T` satisfies the associated constraints of `reverse_iterator`, i.e., is a `BidirectionalIterator`.\r\n\r\n* [reverse.iter.cons]/1:\r\n\r\n  > *Effects:* Value initializes `current`. Iterator operations applied to the resulting iterator have defined\r\nbehavior if and only if the corresponding operations are defined on a value-initialized iterator of type\r\n`I`. If `I` is a literal type, then this constructor shall be a trivial constructor.\r\n\r\n  Since `I` is the type of `current`, it is not possible to satisfy both \"value initializes `current`\" and \"If `I` is literal this constructor is trivial.\"\r\n\r\n  I'm a huge fan of default initialization since I think it makes bugs more apparent than value-initialization, so I would favor declaring this constructor as explicitly defaulted. That said, I know most people don't agree with me so we should probably strike the sentence \" If `I` is a literal type, then this constructor shall be a trivial constructor.\"\r\n\r\n* [reverse.iter.op.star]:\r\n\r\n  > *Effects:*\r\n  ```\r\nI tmp = current;\r\nreturn *--tmp;\r\n```\r\n\r\n  could be simplified to \"Effects: `return *prev(current);`\r\n\r\n* [reverse.iter.opref]:\r\n\r\n  > Returns: `current`.\r\n\r\n  Should be \"Returns: `prev(current)`\""},"comment":{"url":"https://api.github.com/repos/ericniebler/stl2/issues/comments/127076781","html_url":"https://github.com/ericniebler/stl2/issues/78#issuecomment-127076781","issue_url":"https://api.github.com/repos/ericniebler/stl2/issues/78","id":127076781,"user":{"login":"ericniebler","id":225757,"avatar_url":"https://avatars.githubusercontent.com/u/225757?v=3","gravatar_id":"","url":"https://api.github.com/users/ericniebler","html_url":"https://github.com/ericniebler","followers_url":"https://api.github.com/users/ericniebler/followers","following_url":"https://api.github.com/users/ericniebler/following{/other_user}","gists_url":"https://api.github.com/users/ericniebler/gists{/gist_id}","starred_url":"https://api.github.com/users/ericniebler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericniebler/subscriptions","organizations_url":"https://api.github.com/users/ericniebler/orgs","repos_url":"https://api.github.com/users/ericniebler/repos","events_url":"https://api.github.com/users/ericniebler/events{/privacy}","received_events_url":"https://api.github.com/users/ericniebler/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T22:16:44Z","updated_at":"2015-08-02T22:16:44Z","body":"> Should be \"`Returns: prev(current)`\"\r\n\r\nI've tried to minimize the superfluous diffs from the current draft standard. If it doesn't need to be changed, I say leave it."}}