{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/46918142","id":46918142,"diff_hunk":"@@ -6896,3 +6896,222 @@ unittest\n         ubyte, ubyte, T3, T3,\n     );\n }\n+\n+/++\n+ + Type constructor for head-const variables.\n+ +\n+ + Head-const variables cannot be directly mutated or rebound, but references\n+ + reached through the variable are typed with their original mutability.\n+ + It is equivalent to $(D final) variables in D1 and Java, as well as\n+ + $(D readonly) variables in C#.\n+ +\n+ + When $(D T) is a $(D const) or $(D immutable) type, $(D HeadConst) aliases\n+ + to $(D T).\n+ +/\n+struct HeadConst(T)\n+    if (!is(T == const) && !is(T == immutable))\n+{\n+    private T HeadConst_value;\n+    mixin Proxy!HeadConst_value;\n+\n+    /++\n+     + Construction is forwarded to the underlying type.\n+     +/\n+    this(T other)\n+    {\n+        this.HeadConst_value = other;\n+    }\n+\n+    /// Ditto\n+    this(Args...)(auto ref Args args)\n+        if (__traits(compiles, T(args)))\n+    {\n+        static assert((!is(T == struct) && !is(T == union)) || !isNested!T,\n+            \"Nested type \" ~ fullyQualifiedName!T ~ \" must be constructed \" ~","path":"std/typecons.d","position":35,"original_position":35,"commit_id":"0ec76f9285326fa63bb062fdb3434dd477e36222","original_commit_id":"0ec76f9285326fa63bb062fdb3434dd477e36222","user":{"login":"tsbockman","id":1332026,"avatar_url":"https://avatars.githubusercontent.com/u/1332026?v=3","gravatar_id":"","url":"https://api.github.com/users/tsbockman","html_url":"https://github.com/tsbockman","followers_url":"https://api.github.com/users/tsbockman/followers","following_url":"https://api.github.com/users/tsbockman/following{/other_user}","gists_url":"https://api.github.com/users/tsbockman/gists{/gist_id}","starred_url":"https://api.github.com/users/tsbockman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsbockman/subscriptions","organizations_url":"https://api.github.com/users/tsbockman/orgs","repos_url":"https://api.github.com/users/tsbockman/repos","events_url":"https://api.github.com/users/tsbockman/events{/privacy}","received_events_url":"https://api.github.com/users/tsbockman/received_events","type":"User","site_admin":false},"body":"\"*Nested type T must be* **marked as static** *or constructed explicitly at the call-site*\", etc.\r\n\r\nSince the error triggers even when the context is not actually being used for anything, just marking the type as `static` is going to be the best fix most of the time.","created_at":"2015-12-08T06:09:26Z","updated_at":"2015-12-08T06:09:26Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/3862#discussion_r46918142","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/46918142"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3862#discussion_r46918142"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862","id":52936596,"html_url":"https://github.com/D-Programming-Language/phobos/pull/3862","diff_url":"https://github.com/D-Programming-Language/phobos/pull/3862.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/3862.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3862","number":3862,"state":"open","locked":false,"title":"Add std.typecons.HeadConst (Continuation of #2881)","user":{"login":"JakobOvrum","id":155856,"avatar_url":"https://avatars.githubusercontent.com/u/155856?v=3","gravatar_id":"","url":"https://api.github.com/users/JakobOvrum","html_url":"https://github.com/JakobOvrum","followers_url":"https://api.github.com/users/JakobOvrum/followers","following_url":"https://api.github.com/users/JakobOvrum/following{/other_user}","gists_url":"https://api.github.com/users/JakobOvrum/gists{/gist_id}","starred_url":"https://api.github.com/users/JakobOvrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakobOvrum/subscriptions","organizations_url":"https://api.github.com/users/JakobOvrum/orgs","repos_url":"https://api.github.com/users/JakobOvrum/repos","events_url":"https://api.github.com/users/JakobOvrum/events{/privacy}","received_events_url":"https://api.github.com/users/JakobOvrum/received_events","type":"User","site_admin":false},"body":"Ressurection of #2881. Fixes the issue @monarchdodra pointed out by using std.typecons.Proxy.\r\n\r\nGithub didn't give me the option to reopen the old PR after I force pushed the new changes.\r\n","created_at":"2015-12-08T04:15:02Z","updated_at":"2015-12-08T06:09:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9be217e96d768058cd0a358b239d04b46f528850","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3862/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/0ec76f9285326fa63bb062fdb3434dd477e36222","head":{"label":"JakobOvrum:final","ref":"final","sha":"0ec76f9285326fa63bb062fdb3434dd477e36222","user":{"login":"JakobOvrum","id":155856,"avatar_url":"https://avatars.githubusercontent.com/u/155856?v=3","gravatar_id":"","url":"https://api.github.com/users/JakobOvrum","html_url":"https://github.com/JakobOvrum","followers_url":"https://api.github.com/users/JakobOvrum/followers","following_url":"https://api.github.com/users/JakobOvrum/following{/other_user}","gists_url":"https://api.github.com/users/JakobOvrum/gists{/gist_id}","starred_url":"https://api.github.com/users/JakobOvrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakobOvrum/subscriptions","organizations_url":"https://api.github.com/users/JakobOvrum/orgs","repos_url":"https://api.github.com/users/JakobOvrum/repos","events_url":"https://api.github.com/users/JakobOvrum/events{/privacy}","received_events_url":"https://api.github.com/users/JakobOvrum/received_events","type":"User","site_admin":false},"repo":{"id":6076265,"name":"phobos","full_name":"JakobOvrum/phobos","owner":{"login":"JakobOvrum","id":155856,"avatar_url":"https://avatars.githubusercontent.com/u/155856?v=3","gravatar_id":"","url":"https://api.github.com/users/JakobOvrum","html_url":"https://github.com/JakobOvrum","followers_url":"https://api.github.com/users/JakobOvrum/followers","following_url":"https://api.github.com/users/JakobOvrum/following{/other_user}","gists_url":"https://api.github.com/users/JakobOvrum/gists{/gist_id}","starred_url":"https://api.github.com/users/JakobOvrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakobOvrum/subscriptions","organizations_url":"https://api.github.com/users/JakobOvrum/orgs","repos_url":"https://api.github.com/users/JakobOvrum/repos","events_url":"https://api.github.com/users/JakobOvrum/events{/privacy}","received_events_url":"https://api.github.com/users/JakobOvrum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JakobOvrum/phobos","description":"Runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/JakobOvrum/phobos","forks_url":"https://api.github.com/repos/JakobOvrum/phobos/forks","keys_url":"https://api.github.com/repos/JakobOvrum/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JakobOvrum/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JakobOvrum/phobos/teams","hooks_url":"https://api.github.com/repos/JakobOvrum/phobos/hooks","issue_events_url":"https://api.github.com/repos/JakobOvrum/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/JakobOvrum/phobos/events","assignees_url":"https://api.github.com/repos/JakobOvrum/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/JakobOvrum/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/JakobOvrum/phobos/tags","blobs_url":"https://api.github.com/repos/JakobOvrum/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JakobOvrum/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JakobOvrum/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/JakobOvrum/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JakobOvrum/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/JakobOvrum/phobos/languages","stargazers_url":"https://api.github.com/repos/JakobOvrum/phobos/stargazers","contributors_url":"https://api.github.com/repos/JakobOvrum/phobos/contributors","subscribers_url":"https://api.github.com/repos/JakobOvrum/phobos/subscribers","subscription_url":"https://api.github.com/repos/JakobOvrum/phobos/subscription","commits_url":"https://api.github.com/repos/JakobOvrum/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/JakobOvrum/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/JakobOvrum/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/JakobOvrum/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/JakobOvrum/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/JakobOvrum/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JakobOvrum/phobos/merges","archive_url":"https://api.github.com/repos/JakobOvrum/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JakobOvrum/phobos/downloads","issues_url":"https://api.github.com/repos/JakobOvrum/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/JakobOvrum/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/JakobOvrum/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/JakobOvrum/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JakobOvrum/phobos/labels{/name}","releases_url":"https://api.github.com/repos/JakobOvrum/phobos/releases{/id}","created_at":"2012-10-04T14:09:48Z","updated_at":"2015-01-20T00:38:44Z","pushed_at":"2015-12-08T05:56:41Z","git_url":"git://github.com/JakobOvrum/phobos.git","ssh_url":"git@github.com:JakobOvrum/phobos.git","clone_url":"https://github.com/JakobOvrum/phobos.git","svn_url":"https://github.com/JakobOvrum/phobos","homepage":"d-programming-language.org","size":47949,"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":"D-Programming-Language:master","ref":"master","sha":"8da9dbc2ae7a80be15a9cda8e5824cb9501178b1","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","created_at":"2011-01-15T07:00:06Z","updated_at":"2015-12-02T21:31:53Z","pushed_at":"2015-12-08T05:56:42Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":68063,"stargazers_count":652,"watchers_count":652,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":432,"mirror_url":null,"open_issues_count":74,"forks":432,"open_issues":74,"watchers":652,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/3862"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3862"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/3862/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/3862/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/0ec76f9285326fa63bb062fdb3434dd477e36222"}}}}