{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/GSL/pulls/comments/85450188","pull_request_review_id":6167003,"id":85450188,"diff_hunk":"@@ -135,30 +135,30 @@ inline T narrow(U u)\n // at() - Bounds-checked way of accessing static arrays, std::array, std::vector\n //\n template <class T, size_t N>\n-constexpr T& at(T (&arr)[N], size_t index)\n+constexpr T& at(T (&arr)[N], std::ptrdiff_t index)\n {\n-    Expects(index < N);\n-    return arr[index];\n+    Expects(index >= 0 && index < narrow_cast<decltype(index)>(N));\n+    return arr[static_cast<size_t>(index)];","path":"gsl/gsl_util","position":10,"original_position":10,"commit_id":"85957aa793b4bd36c4bd158d2653683d8d61db58","original_commit_id":"85957aa793b4bd36c4bd158d2653683d8d61db58","user":{"login":"gdr-at-ms","id":11031650,"avatar_url":"https://avatars.githubusercontent.com/u/11031650?v=3","gravatar_id":"","url":"https://api.github.com/users/gdr-at-ms","html_url":"https://github.com/gdr-at-ms","followers_url":"https://api.github.com/users/gdr-at-ms/followers","following_url":"https://api.github.com/users/gdr-at-ms/following{/other_user}","gists_url":"https://api.github.com/users/gdr-at-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/gdr-at-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdr-at-ms/subscriptions","organizations_url":"https://api.github.com/users/gdr-at-ms/orgs","repos_url":"https://api.github.com/users/gdr-at-ms/repos","events_url":"https://api.github.com/users/gdr-at-ms/events{/privacy}","received_events_url":"https://api.github.com/users/gdr-at-ms/received_events","type":"User","site_admin":false},"body":"Why `decltype(index)`?  Why is the cast even needed?","created_at":"2016-10-27T23:47:16Z","updated_at":"2016-10-27T23:47:44Z","html_url":"https://github.com/Microsoft/GSL/pull/408#discussion_r85450188","pull_request_url":"https://api.github.com/repos/Microsoft/GSL/pulls/408","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/comments/85450188"},"html":{"href":"https://github.com/Microsoft/GSL/pull/408#discussion_r85450188"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/408"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/GSL/pulls/408","id":91298702,"html_url":"https://github.com/Microsoft/GSL/pull/408","diff_url":"https://github.com/Microsoft/GSL/pull/408.diff","patch_url":"https://github.com/Microsoft/GSL/pull/408.patch","issue_url":"https://api.github.com/repos/Microsoft/GSL/issues/408","number":408,"state":"open","locked":false,"title":"Fix gsl::at's use of size_t","user":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars.githubusercontent.com/u/5932003?v=3","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"body":"gsl::at should use std::ptrdiff_t instead of size_t. This patch\r\nfixes that, and adds missing unit tests\r\n\r\nSigned-off-by: “Rian <“rianquinn@gmail.com”>","created_at":"2016-10-27T23:24:49Z","updated_at":"2016-10-27T23:47:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6af3d2bf209c86b47a0cf7728ab23eb3843c0e6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/GSL/pulls/408/commits","review_comments_url":"https://api.github.com/repos/Microsoft/GSL/pulls/408/comments","review_comment_url":"https://api.github.com/repos/Microsoft/GSL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/GSL/issues/408/comments","statuses_url":"https://api.github.com/repos/Microsoft/GSL/statuses/85957aa793b4bd36c4bd158d2653683d8d61db58","head":{"label":"rianquinn:fix_at_size_t","ref":"fix_at_size_t","sha":"85957aa793b4bd36c4bd158d2653683d8d61db58","user":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars.githubusercontent.com/u/5932003?v=3","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"repo":{"id":66045691,"name":"GSL","full_name":"rianquinn/GSL","owner":{"login":"rianquinn","id":5932003,"avatar_url":"https://avatars.githubusercontent.com/u/5932003?v=3","gravatar_id":"","url":"https://api.github.com/users/rianquinn","html_url":"https://github.com/rianquinn","followers_url":"https://api.github.com/users/rianquinn/followers","following_url":"https://api.github.com/users/rianquinn/following{/other_user}","gists_url":"https://api.github.com/users/rianquinn/gists{/gist_id}","starred_url":"https://api.github.com/users/rianquinn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rianquinn/subscriptions","organizations_url":"https://api.github.com/users/rianquinn/orgs","repos_url":"https://api.github.com/users/rianquinn/repos","events_url":"https://api.github.com/users/rianquinn/events{/privacy}","received_events_url":"https://api.github.com/users/rianquinn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rianquinn/GSL","description":"Guidelines Support Library","fork":true,"url":"https://api.github.com/repos/rianquinn/GSL","forks_url":"https://api.github.com/repos/rianquinn/GSL/forks","keys_url":"https://api.github.com/repos/rianquinn/GSL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rianquinn/GSL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rianquinn/GSL/teams","hooks_url":"https://api.github.com/repos/rianquinn/GSL/hooks","issue_events_url":"https://api.github.com/repos/rianquinn/GSL/issues/events{/number}","events_url":"https://api.github.com/repos/rianquinn/GSL/events","assignees_url":"https://api.github.com/repos/rianquinn/GSL/assignees{/user}","branches_url":"https://api.github.com/repos/rianquinn/GSL/branches{/branch}","tags_url":"https://api.github.com/repos/rianquinn/GSL/tags","blobs_url":"https://api.github.com/repos/rianquinn/GSL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rianquinn/GSL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rianquinn/GSL/git/refs{/sha}","trees_url":"https://api.github.com/repos/rianquinn/GSL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rianquinn/GSL/statuses/{sha}","languages_url":"https://api.github.com/repos/rianquinn/GSL/languages","stargazers_url":"https://api.github.com/repos/rianquinn/GSL/stargazers","contributors_url":"https://api.github.com/repos/rianquinn/GSL/contributors","subscribers_url":"https://api.github.com/repos/rianquinn/GSL/subscribers","subscription_url":"https://api.github.com/repos/rianquinn/GSL/subscription","commits_url":"https://api.github.com/repos/rianquinn/GSL/commits{/sha}","git_commits_url":"https://api.github.com/repos/rianquinn/GSL/git/commits{/sha}","comments_url":"https://api.github.com/repos/rianquinn/GSL/comments{/number}","issue_comment_url":"https://api.github.com/repos/rianquinn/GSL/issues/comments{/number}","contents_url":"https://api.github.com/repos/rianquinn/GSL/contents/{+path}","compare_url":"https://api.github.com/repos/rianquinn/GSL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rianquinn/GSL/merges","archive_url":"https://api.github.com/repos/rianquinn/GSL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rianquinn/GSL/downloads","issues_url":"https://api.github.com/repos/rianquinn/GSL/issues{/number}","pulls_url":"https://api.github.com/repos/rianquinn/GSL/pulls{/number}","milestones_url":"https://api.github.com/repos/rianquinn/GSL/milestones{/number}","notifications_url":"https://api.github.com/repos/rianquinn/GSL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rianquinn/GSL/labels{/name}","releases_url":"https://api.github.com/repos/rianquinn/GSL/releases{/id}","deployments_url":"https://api.github.com/repos/rianquinn/GSL/deployments","created_at":"2016-08-19T02:22:15Z","updated_at":"2016-08-19T02:22:16Z","pushed_at":"2016-10-27T23:30:37Z","git_url":"git://github.com/rianquinn/GSL.git","ssh_url":"git@github.com:rianquinn/GSL.git","clone_url":"https://github.com/rianquinn/GSL.git","svn_url":"https://github.com/rianquinn/GSL","homepage":null,"size":582,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"Microsoft:master","ref":"master","sha":"6cffe0d14cbc0540e16939aaffbee3451fa0a131","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":41005795,"name":"GSL","full_name":"Microsoft/GSL","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/GSL","description":"Guidelines Support Library","fork":false,"url":"https://api.github.com/repos/Microsoft/GSL","forks_url":"https://api.github.com/repos/Microsoft/GSL/forks","keys_url":"https://api.github.com/repos/Microsoft/GSL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/GSL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/GSL/teams","hooks_url":"https://api.github.com/repos/Microsoft/GSL/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/GSL/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/GSL/events","assignees_url":"https://api.github.com/repos/Microsoft/GSL/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/GSL/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/GSL/tags","blobs_url":"https://api.github.com/repos/Microsoft/GSL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/GSL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/GSL/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/GSL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/GSL/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/GSL/languages","stargazers_url":"https://api.github.com/repos/Microsoft/GSL/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/GSL/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/GSL/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/GSL/subscription","commits_url":"https://api.github.com/repos/Microsoft/GSL/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/GSL/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/GSL/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/GSL/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/GSL/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/GSL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/GSL/merges","archive_url":"https://api.github.com/repos/Microsoft/GSL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/GSL/downloads","issues_url":"https://api.github.com/repos/Microsoft/GSL/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/GSL/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/GSL/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/GSL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/GSL/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/GSL/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/GSL/deployments","created_at":"2015-08-19T01:11:19Z","updated_at":"2016-10-27T11:45:51Z","pushed_at":"2016-10-27T23:30:37Z","git_url":"git://github.com/Microsoft/GSL.git","ssh_url":"git@github.com:Microsoft/GSL.git","clone_url":"https://github.com/Microsoft/GSL.git","svn_url":"https://github.com/Microsoft/GSL","homepage":null,"size":884,"stargazers_count":1774,"watchers_count":1774,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":212,"mirror_url":null,"open_issues_count":61,"forks":212,"open_issues":61,"watchers":1774,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/408"},"html":{"href":"https://github.com/Microsoft/GSL/pull/408"},"issue":{"href":"https://api.github.com/repos/Microsoft/GSL/issues/408"},"comments":{"href":"https://api.github.com/repos/Microsoft/GSL/issues/408/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/408/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/408/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/GSL/statuses/85957aa793b4bd36c4bd158d2653683d8d61db58"}}}}
{"actor":{"display_login":"gdr-at-ms"}}