{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/phobos/pulls/comments/91002322","pull_request_review_id":11481122,"id":91002322,"diff_hunk":"@@ -9594,6 +9594,324 @@ auto refRange(R)(R* range)\n     foo(r);\n }\n \n+/**\n+Bitwise adapter over Integral type Ranges. Consumes the range elements bit by bit.\n+*/\n+struct Bitwise(R)\n+    if (isInputRange!R && isIntegral!(ElementType!R))\n+{\n+    alias ER = ElementType!R;\n+    alias UER = Unsigned!ER;\n+\n+    private R parent;\n+    private UER mask;\n+    private int maskPos;\n+    private ER accumulator;\n+\n+    private enum UER bitsNum = ER.sizeof * 8;\n+\n+    this()(auto ref R range)\n+    {\n+        parent = range;\n+\n+        static if (hasLength!R)\n+        {\n+            len = parent.length * bitsNum;\n+        }\n+\n+        initPrivates();\n+\n+        static if (isBidirectionalRange!R)\n+        {\n+            initBackPrivates();\n+        }\n+    }\n+\n+    bool empty() const\n+    {\n+        static if (hasLength!R)\n+        {\n+            return len == 0;\n+        }\n+        else\n+        {\n+            /*\n+               If we consumed the last element of the range, but not all the\n+               bits in the last element\n+             */\n+            return parent.empty && (maskPos == 0);","path":"std/range/package.d","position":49,"original_position":49,"commit_id":"1684929e0c573c5df242efbc4f1541636857c080","original_commit_id":"1684929e0c573c5df242efbc4f1541636857c080","user":{"login":"andralex","id":566679,"avatar_url":"https://avatars.githubusercontent.com/u/566679?v=3","gravatar_id":"","url":"https://api.github.com/users/andralex","html_url":"https://github.com/andralex","followers_url":"https://api.github.com/users/andralex/followers","following_url":"https://api.github.com/users/andralex/following{/other_user}","gists_url":"https://api.github.com/users/andralex/gists{/gist_id}","starred_url":"https://api.github.com/users/andralex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andralex/subscriptions","organizations_url":"https://api.github.com/users/andralex/orgs","repos_url":"https://api.github.com/users/andralex/repos","events_url":"https://api.github.com/users/andralex/events{/privacy}","received_events_url":"https://api.github.com/users/andralex/received_events","type":"User","site_admin":false},"body":"How about backMaskPos?","created_at":"2016-12-06T02:43:09Z","updated_at":"2016-12-06T02:43:09Z","html_url":"https://github.com/dlang/phobos/pull/4927#discussion_r91002322","pull_request_url":"https://api.github.com/repos/dlang/phobos/pulls/4927","_links":{"self":{"href":"https://api.github.com/repos/dlang/phobos/pulls/comments/91002322"},"html":{"href":"https://github.com/dlang/phobos/pull/4927#discussion_r91002322"},"pull_request":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4927"}}},"pull_request":{"url":"https://api.github.com/repos/dlang/phobos/pulls/4927","id":95895465,"html_url":"https://github.com/dlang/phobos/pull/4927","diff_url":"https://github.com/dlang/phobos/pull/4927.diff","patch_url":"https://github.com/dlang/phobos/pull/4927.patch","issue_url":"https://api.github.com/repos/dlang/phobos/issues/4927","number":4927,"state":"open","locked":false,"title":"[WIP] std.range: implement bitwise adapter over Integral type Ranges","user":{"login":"edi33416","id":3812633,"avatar_url":"https://avatars.githubusercontent.com/u/3812633?v=3","gravatar_id":"","url":"https://api.github.com/users/edi33416","html_url":"https://github.com/edi33416","followers_url":"https://api.github.com/users/edi33416/followers","following_url":"https://api.github.com/users/edi33416/following{/other_user}","gists_url":"https://api.github.com/users/edi33416/gists{/gist_id}","starred_url":"https://api.github.com/users/edi33416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi33416/subscriptions","organizations_url":"https://api.github.com/users/edi33416/orgs","repos_url":"https://api.github.com/users/edi33416/repos","events_url":"https://api.github.com/users/edi33416/events{/privacy}","received_events_url":"https://api.github.com/users/edi33416/received_events","type":"User","site_admin":false},"body":"Add a generic bitwise adapter to std.range","created_at":"2016-11-30T13:55:38Z","updated_at":"2016-12-06T02:53:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46267056a75c876630306093fe0a8fa86958a2fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/phobos/pulls/4927/commits","review_comments_url":"https://api.github.com/repos/dlang/phobos/pulls/4927/comments","review_comment_url":"https://api.github.com/repos/dlang/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/phobos/issues/4927/comments","statuses_url":"https://api.github.com/repos/dlang/phobos/statuses/1684929e0c573c5df242efbc4f1541636857c080","head":{"label":"edi33416:bitwise_adapter","ref":"bitwise_adapter","sha":"1684929e0c573c5df242efbc4f1541636857c080","user":{"login":"edi33416","id":3812633,"avatar_url":"https://avatars.githubusercontent.com/u/3812633?v=3","gravatar_id":"","url":"https://api.github.com/users/edi33416","html_url":"https://github.com/edi33416","followers_url":"https://api.github.com/users/edi33416/followers","following_url":"https://api.github.com/users/edi33416/following{/other_user}","gists_url":"https://api.github.com/users/edi33416/gists{/gist_id}","starred_url":"https://api.github.com/users/edi33416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi33416/subscriptions","organizations_url":"https://api.github.com/users/edi33416/orgs","repos_url":"https://api.github.com/users/edi33416/repos","events_url":"https://api.github.com/users/edi33416/events{/privacy}","received_events_url":"https://api.github.com/users/edi33416/received_events","type":"User","site_admin":false},"repo":{"id":73472663,"name":"phobos","full_name":"edi33416/phobos","owner":{"login":"edi33416","id":3812633,"avatar_url":"https://avatars.githubusercontent.com/u/3812633?v=3","gravatar_id":"","url":"https://api.github.com/users/edi33416","html_url":"https://github.com/edi33416","followers_url":"https://api.github.com/users/edi33416/followers","following_url":"https://api.github.com/users/edi33416/following{/other_user}","gists_url":"https://api.github.com/users/edi33416/gists{/gist_id}","starred_url":"https://api.github.com/users/edi33416/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edi33416/subscriptions","organizations_url":"https://api.github.com/users/edi33416/orgs","repos_url":"https://api.github.com/users/edi33416/repos","events_url":"https://api.github.com/users/edi33416/events{/privacy}","received_events_url":"https://api.github.com/users/edi33416/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edi33416/phobos","description":"The standard library of the D programming language","fork":true,"url":"https://api.github.com/repos/edi33416/phobos","forks_url":"https://api.github.com/repos/edi33416/phobos/forks","keys_url":"https://api.github.com/repos/edi33416/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edi33416/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edi33416/phobos/teams","hooks_url":"https://api.github.com/repos/edi33416/phobos/hooks","issue_events_url":"https://api.github.com/repos/edi33416/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/edi33416/phobos/events","assignees_url":"https://api.github.com/repos/edi33416/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/edi33416/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/edi33416/phobos/tags","blobs_url":"https://api.github.com/repos/edi33416/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edi33416/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edi33416/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/edi33416/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edi33416/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/edi33416/phobos/languages","stargazers_url":"https://api.github.com/repos/edi33416/phobos/stargazers","contributors_url":"https://api.github.com/repos/edi33416/phobos/contributors","subscribers_url":"https://api.github.com/repos/edi33416/phobos/subscribers","subscription_url":"https://api.github.com/repos/edi33416/phobos/subscription","commits_url":"https://api.github.com/repos/edi33416/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/edi33416/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/edi33416/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/edi33416/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/edi33416/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/edi33416/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edi33416/phobos/merges","archive_url":"https://api.github.com/repos/edi33416/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edi33416/phobos/downloads","issues_url":"https://api.github.com/repos/edi33416/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/edi33416/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/edi33416/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/edi33416/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edi33416/phobos/labels{/name}","releases_url":"https://api.github.com/repos/edi33416/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/edi33416/phobos/deployments","created_at":"2016-11-11T11:34:18Z","updated_at":"2016-11-11T11:34:22Z","pushed_at":"2016-11-30T15:08:20Z","git_url":"git://github.com/edi33416/phobos.git","ssh_url":"git@github.com:edi33416/phobos.git","clone_url":"https://github.com/edi33416/phobos.git","svn_url":"https://github.com/edi33416/phobos","homepage":"dlang.org/phobos","size":47118,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"f6b4e89d64eb998b80a70f23426e0e509e1933d8","user":{"login":"dlang","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"dlang/phobos","owner":{"login":"dlang","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dlang/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/dlang/phobos","forks_url":"https://api.github.com/repos/dlang/phobos/forks","keys_url":"https://api.github.com/repos/dlang/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/phobos/teams","hooks_url":"https://api.github.com/repos/dlang/phobos/hooks","issue_events_url":"https://api.github.com/repos/dlang/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/phobos/events","assignees_url":"https://api.github.com/repos/dlang/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/phobos/tags","blobs_url":"https://api.github.com/repos/dlang/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/phobos/languages","stargazers_url":"https://api.github.com/repos/dlang/phobos/stargazers","contributors_url":"https://api.github.com/repos/dlang/phobos/contributors","subscribers_url":"https://api.github.com/repos/dlang/phobos/subscribers","subscription_url":"https://api.github.com/repos/dlang/phobos/subscription","commits_url":"https://api.github.com/repos/dlang/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/phobos/merges","archive_url":"https://api.github.com/repos/dlang/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/phobos/downloads","issues_url":"https://api.github.com/repos/dlang/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/phobos/labels{/name}","releases_url":"https://api.github.com/repos/dlang/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/phobos/deployments","created_at":"2011-01-15T07:00:06Z","updated_at":"2016-12-01T13:32:03Z","pushed_at":"2016-12-06T02:25:08Z","git_url":"git://github.com/dlang/phobos.git","ssh_url":"git@github.com:dlang/phobos.git","clone_url":"https://github.com/dlang/phobos.git","svn_url":"https://github.com/dlang/phobos","homepage":"dlang.org/phobos","size":77563,"stargazers_count":759,"watchers_count":759,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":527,"mirror_url":null,"open_issues_count":89,"forks":527,"open_issues":89,"watchers":759,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4927"},"html":{"href":"https://github.com/dlang/phobos/pull/4927"},"issue":{"href":"https://api.github.com/repos/dlang/phobos/issues/4927"},"comments":{"href":"https://api.github.com/repos/dlang/phobos/issues/4927/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4927/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/phobos/pulls/4927/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/phobos/statuses/1684929e0c573c5df242efbc4f1541636857c080"}}}}
{"actor":{"display_login":"andralex"}}