{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/GSL/pulls/comments/88968825","pull_request_review_id":9523316,"id":88968825,"diff_hunk":"@@ -670,6 +670,19 @@ span<typename Ptr::element_type>\n make_span(Ptr& cont)\n { return span<typename Ptr::element_type>(cont); }\n \n+template <class T, class = std::enable_if_t<std::is_pod<T>::value>>\n+span<const byte, sizeof(T)>\n+as_bytes(const T& e) noexcept\n+{\n+    return{ reinterpret_cast<const byte*>(&e),sizeof(T) };\n+}\n+\n+template <class T, class = std::enable_if_t<std::is_trivially_copyable<T>::value>>","path":"gsl/span","position":11,"original_position":11,"commit_id":"b9a3f43ca839b1c4390f4d54f5951ac254da71c0","original_commit_id":"b9a3f43ca839b1c4390f4d54f5951ac254da71c0","user":{"login":"neilmacintosh","id":10985489,"avatar_url":"https://avatars.githubusercontent.com/u/10985489?v=3","gravatar_id":"","url":"https://api.github.com/users/neilmacintosh","html_url":"https://github.com/neilmacintosh","followers_url":"https://api.github.com/users/neilmacintosh/followers","following_url":"https://api.github.com/users/neilmacintosh/following{/other_user}","gists_url":"https://api.github.com/users/neilmacintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/neilmacintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilmacintosh/subscriptions","organizations_url":"https://api.github.com/users/neilmacintosh/orgs","repos_url":"https://api.github.com/users/neilmacintosh/repos","events_url":"https://api.github.com/users/neilmacintosh/events{/privacy}","received_events_url":"https://api.github.com/users/neilmacintosh/received_events","type":"User","site_admin":false},"body":"I'm pretty sure the one restriction you do need here is to ensure that `T` is not `const`.","created_at":"2016-11-21T19:25:32Z","updated_at":"2016-11-21T19:26:17Z","html_url":"https://github.com/Microsoft/GSL/pull/374#discussion_r88968825","pull_request_url":"https://api.github.com/repos/Microsoft/GSL/pulls/374","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/comments/88968825"},"html":{"href":"https://github.com/Microsoft/GSL/pull/374#discussion_r88968825"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/374"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/GSL/pulls/374","id":86426127,"html_url":"https://github.com/Microsoft/GSL/pull/374","diff_url":"https://github.com/Microsoft/GSL/pull/374.diff","patch_url":"https://github.com/Microsoft/GSL/pull/374.patch","issue_url":"https://api.github.com/repos/Microsoft/GSL/issues/374","number":374,"state":"open","locked":false,"title":"Add overload for as_bytes taking a single object ","user":{"login":"MikeGitb","id":13987901,"avatar_url":"https://avatars.githubusercontent.com/u/13987901?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeGitb","html_url":"https://github.com/MikeGitb","followers_url":"https://api.github.com/users/MikeGitb/followers","following_url":"https://api.github.com/users/MikeGitb/following{/other_user}","gists_url":"https://api.github.com/users/MikeGitb/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeGitb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeGitb/subscriptions","organizations_url":"https://api.github.com/users/MikeGitb/orgs","repos_url":"https://api.github.com/users/MikeGitb/repos","events_url":"https://api.github.com/users/MikeGitb/events{/privacy}","received_events_url":"https://api.github.com/users/MikeGitb/received_events","type":"User","site_admin":false},"body":"as discussed in #371\n","created_at":"2016-09-22T22:31:38Z","updated_at":"2016-11-21T19:26:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec25a4ef2e29b4817902ebd38acd09f9f81a3aeb","assignee":{"login":"neilmacintosh","id":10985489,"avatar_url":"https://avatars.githubusercontent.com/u/10985489?v=3","gravatar_id":"","url":"https://api.github.com/users/neilmacintosh","html_url":"https://github.com/neilmacintosh","followers_url":"https://api.github.com/users/neilmacintosh/followers","following_url":"https://api.github.com/users/neilmacintosh/following{/other_user}","gists_url":"https://api.github.com/users/neilmacintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/neilmacintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilmacintosh/subscriptions","organizations_url":"https://api.github.com/users/neilmacintosh/orgs","repos_url":"https://api.github.com/users/neilmacintosh/repos","events_url":"https://api.github.com/users/neilmacintosh/events{/privacy}","received_events_url":"https://api.github.com/users/neilmacintosh/received_events","type":"User","site_admin":false},"assignees":[{"login":"neilmacintosh","id":10985489,"avatar_url":"https://avatars.githubusercontent.com/u/10985489?v=3","gravatar_id":"","url":"https://api.github.com/users/neilmacintosh","html_url":"https://github.com/neilmacintosh","followers_url":"https://api.github.com/users/neilmacintosh/followers","following_url":"https://api.github.com/users/neilmacintosh/following{/other_user}","gists_url":"https://api.github.com/users/neilmacintosh/gists{/gist_id}","starred_url":"https://api.github.com/users/neilmacintosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilmacintosh/subscriptions","organizations_url":"https://api.github.com/users/neilmacintosh/orgs","repos_url":"https://api.github.com/users/neilmacintosh/repos","events_url":"https://api.github.com/users/neilmacintosh/events{/privacy}","received_events_url":"https://api.github.com/users/neilmacintosh/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/GSL/pulls/374/commits","review_comments_url":"https://api.github.com/repos/Microsoft/GSL/pulls/374/comments","review_comment_url":"https://api.github.com/repos/Microsoft/GSL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/GSL/issues/374/comments","statuses_url":"https://api.github.com/repos/Microsoft/GSL/statuses/b9a3f43ca839b1c4390f4d54f5951ac254da71c0","head":{"label":"MikeGitb:overload_as_bytes","ref":"overload_as_bytes","sha":"b9a3f43ca839b1c4390f4d54f5951ac254da71c0","user":{"login":"MikeGitb","id":13987901,"avatar_url":"https://avatars.githubusercontent.com/u/13987901?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeGitb","html_url":"https://github.com/MikeGitb","followers_url":"https://api.github.com/users/MikeGitb/followers","following_url":"https://api.github.com/users/MikeGitb/following{/other_user}","gists_url":"https://api.github.com/users/MikeGitb/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeGitb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeGitb/subscriptions","organizations_url":"https://api.github.com/users/MikeGitb/orgs","repos_url":"https://api.github.com/users/MikeGitb/repos","events_url":"https://api.github.com/users/MikeGitb/events{/privacy}","received_events_url":"https://api.github.com/users/MikeGitb/received_events","type":"User","site_admin":false},"repo":{"id":65853997,"name":"GSL","full_name":"MikeGitb/GSL","owner":{"login":"MikeGitb","id":13987901,"avatar_url":"https://avatars.githubusercontent.com/u/13987901?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeGitb","html_url":"https://github.com/MikeGitb","followers_url":"https://api.github.com/users/MikeGitb/followers","following_url":"https://api.github.com/users/MikeGitb/following{/other_user}","gists_url":"https://api.github.com/users/MikeGitb/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeGitb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeGitb/subscriptions","organizations_url":"https://api.github.com/users/MikeGitb/orgs","repos_url":"https://api.github.com/users/MikeGitb/repos","events_url":"https://api.github.com/users/MikeGitb/events{/privacy}","received_events_url":"https://api.github.com/users/MikeGitb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikeGitb/GSL","description":"Guidelines Support Library","fork":true,"url":"https://api.github.com/repos/MikeGitb/GSL","forks_url":"https://api.github.com/repos/MikeGitb/GSL/forks","keys_url":"https://api.github.com/repos/MikeGitb/GSL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikeGitb/GSL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikeGitb/GSL/teams","hooks_url":"https://api.github.com/repos/MikeGitb/GSL/hooks","issue_events_url":"https://api.github.com/repos/MikeGitb/GSL/issues/events{/number}","events_url":"https://api.github.com/repos/MikeGitb/GSL/events","assignees_url":"https://api.github.com/repos/MikeGitb/GSL/assignees{/user}","branches_url":"https://api.github.com/repos/MikeGitb/GSL/branches{/branch}","tags_url":"https://api.github.com/repos/MikeGitb/GSL/tags","blobs_url":"https://api.github.com/repos/MikeGitb/GSL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikeGitb/GSL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikeGitb/GSL/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikeGitb/GSL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikeGitb/GSL/statuses/{sha}","languages_url":"https://api.github.com/repos/MikeGitb/GSL/languages","stargazers_url":"https://api.github.com/repos/MikeGitb/GSL/stargazers","contributors_url":"https://api.github.com/repos/MikeGitb/GSL/contributors","subscribers_url":"https://api.github.com/repos/MikeGitb/GSL/subscribers","subscription_url":"https://api.github.com/repos/MikeGitb/GSL/subscription","commits_url":"https://api.github.com/repos/MikeGitb/GSL/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikeGitb/GSL/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikeGitb/GSL/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikeGitb/GSL/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikeGitb/GSL/contents/{+path}","compare_url":"https://api.github.com/repos/MikeGitb/GSL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikeGitb/GSL/merges","archive_url":"https://api.github.com/repos/MikeGitb/GSL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikeGitb/GSL/downloads","issues_url":"https://api.github.com/repos/MikeGitb/GSL/issues{/number}","pulls_url":"https://api.github.com/repos/MikeGitb/GSL/pulls{/number}","milestones_url":"https://api.github.com/repos/MikeGitb/GSL/milestones{/number}","notifications_url":"https://api.github.com/repos/MikeGitb/GSL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikeGitb/GSL/labels{/name}","releases_url":"https://api.github.com/repos/MikeGitb/GSL/releases{/id}","deployments_url":"https://api.github.com/repos/MikeGitb/GSL/deployments","created_at":"2016-08-16T21:11:47Z","updated_at":"2016-08-16T21:11:48Z","pushed_at":"2016-11-19T02:25:57Z","git_url":"git://github.com/MikeGitb/GSL.git","ssh_url":"git@github.com:MikeGitb/GSL.git","clone_url":"https://github.com/MikeGitb/GSL.git","svn_url":"https://github.com/MikeGitb/GSL","homepage":null,"size":583,"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":"d2dafe2ddfcad927eb9d65f89046c5c1e2113107","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-11-21T17:44:48Z","pushed_at":"2016-11-19T02:25:58Z","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":883,"stargazers_count":1828,"watchers_count":1828,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":214,"mirror_url":null,"open_issues_count":58,"forks":214,"open_issues":58,"watchers":1828,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/374"},"html":{"href":"https://github.com/Microsoft/GSL/pull/374"},"issue":{"href":"https://api.github.com/repos/Microsoft/GSL/issues/374"},"comments":{"href":"https://api.github.com/repos/Microsoft/GSL/issues/374/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/374/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/GSL/pulls/374/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/GSL/statuses/b9a3f43ca839b1c4390f4d54f5951ac254da71c0"}}}}
{"actor":{"display_login":"neilmacintosh"}}