{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/33077469","id":33077469,"diff_hunk":"@@ -0,0 +1,523 @@\n+// Written in the D programming language.\n+\n+/**\n+    This module implements various _color type conversions.\n+\n+    Authors:    Manu Evans\n+    Copyright:  Copyright (c) 2015, Manu Evans.\n+    License:    $(WEB boost.org/LICENSE_1_0.txt, Boost License 1.0)\n+    Source:     $(PHOBOSSRC std/experimental/color/conv.d)\n+*/\n+module std.experimental.color.conv;\n+\n+import std.experimental.color;\n+import std.experimental.color.rgb;\n+import std.experimental.color.xyz;\n+\n+import std.traits: isNumeric, isIntegral, isFloatingPoint, isSigned, TemplateOf;\n+import std.typetuple: TypeTuple;\n+\n+\n+/**\n+Convert between color types.\n+*/\n+To convertColor(To, From)(From color) if(isColor!To && isColor!From)\n+{\n+    // no conversion is necessary\n+    static if(is(To == From))\n+        return color;\n+\n+    // *** XYZ is the root type ***\n+    else static if(isXYZ!From && isXYZ!To)\n+    {\n+        alias F = To.ComponentType;\n+        return To(F(color.X), F(color.Y), F(color.Z));\n+    }\n+\n+    // following conversions come in triplets:\n+    //   Type!U -> Type!V\n+    //   Type -> Parent\n+    //   Parent -> type\n+\n+    // *** RGB triplet ***\n+    else static if(isRGB!From && isRGB!To)\n+    {\n+        alias ToType = To.ComponentType;\n+        alias FromType = From.ComponentType;\n+\n+        auto src = color.tristimulusWithAlpha;\n+\n+        static if(false && From.colorSpace == To.colorSpace && isIntegral!FromType && FromType.sizeof <= 2 &&\n+                    (From.linear != To.linear || !is(FromType == ToType)))\n+        {\n+            alias WorkType = WorkingType!(FromType, ToType);\n+            enum NumValues = 1 << (FromType.sizeof*8);\n+\n+            // <= 16bit type conversion should use a look-up table\n+            shared immutable ToType[NumValues] conversionTable = {\n+                ToType[NumValues] table = void;\n+                foreach(i; 0..NumValues)\n+                {\n+                    WorkType v = convertPixelType!WorkType(cast(FromType)i);\n+                    static if(From.linear == false)\n+                        v = toLinear!(From.colorSpace)(v);\n+                    static if(To.linear == false)\n+                        v = toGamma!(To.colorSpace)(v);\n+                    table[i] = convertPixelType!ToType(v);\n+                }\n+                return table;\n+            }();\n+\n+            static if(To.hasAlpha)\n+                return To(conversionTable[src[0]], conversionTable[src[0]], conversionTable[src[1]], conversionTable[src[2]], convertPixelType!ToType(src[3]));\n+            else\n+                return To(conversionTable[src[0]], conversionTable[src[0]], conversionTable[src[1]], conversionTable[src[2]]);\n+        }\n+        else static if(From.colorSpace == To.colorSpace && From.linear == To.linear)\n+        {\n+            // color space is the same, just do type conversion\n+            return To(convertPixelType!ToType(src[0]), convertPixelType!ToType(src[1]), convertPixelType!ToType(src[2]), convertPixelType!ToType(src[3]));\n+        }\n+        else\n+        {\n+            // unpack the working values\n+            alias WorkType = WorkingType!(FromType, ToType);\n+            WorkType r = convertPixelType!WorkType(src[0]);\n+            WorkType g = convertPixelType!WorkType(src[1]);\n+            WorkType b = convertPixelType!WorkType(src[2]);\n+\n+            static if(From.linear == false)\n+            {\n+                r = toLinear!(From.colorSpace)(r);\n+                g = toLinear!(From.colorSpace)(g);\n+                b = toLinear!(From.colorSpace)(b);\n+            }\n+            static if(From.colorSpace != To.colorSpace)\n+            {\n+                enum toXYZ = RGBColorSpaceMatrix!(From.colorSpace, WorkType);\n+                enum toRGB = inverse(RGBColorSpaceMatrix!(To.colorSpace, WorkType));\n+                enum mat = multiply(toXYZ, toRGB);\n+                WorkType[3] v = multiply(mat, [r, g, b]);\n+                r = v[0]; g = v[1]; b = v[2];\n+            }\n+            static if(To.linear == false)\n+            {\n+                r = toGamma!(To.colorSpace)(r);\n+                g = toGamma!(To.colorSpace)(g);\n+                b = toGamma!(To.colorSpace)(b);\n+            }\n+\n+            // convert and return the output\n+            static if(To.hasAlpha)\n+                return To(convertPixelType!ToType(r), convertPixelType!ToType(g), convertPixelType!ToType(b), convertPixelType!ToType(src[3]));\n+            else\n+                return To(convertPixelType!ToType(r), convertPixelType!ToType(g), convertPixelType!ToType(b));\n+        }\n+    }\n+    else static if(isRGB!From && isXYZ!To)\n+    {\n+        alias ToType = To.ComponentType;\n+        alias FromType = From.ComponentType;\n+        alias WorkType = WorkingType!(FromType, ToType);\n+\n+        // unpack the working values\n+        auto src = color.tristimulus;\n+        WorkType r = convertPixelType!WorkType(src[0]);\n+        WorkType g = convertPixelType!WorkType(src[1]);\n+        WorkType b = convertPixelType!WorkType(src[2]);\n+\n+        static if(From.linear == false)\n+        {\n+            r = toLinear!(From.colorSpace)(r);\n+            g = toLinear!(From.colorSpace)(g);\n+            b = toLinear!(From.colorSpace)(b);\n+        }\n+\n+        // transform to XYZ\n+        enum toXYZ = RGBColorSpaceMatrix!(From.colorSpace, WorkType);\n+        WorkType[3] v = multiply(toXYZ, [r, g, b]);\n+        return To(v[0], v[1], v[2]);\n+    }\n+    else static if(isXYZ!From && isRGB!To)\n+    {\n+        alias ToType = To.ComponentType;\n+        alias FromType = From.ComponentType;\n+        alias WorkType = WorkingType!(FromType, ToType);\n+\n+        enum toRGB = inverse(RGBColorSpaceMatrix!(To.colorSpace, WorkType));\n+        WorkType[3] v = multiply(toRGB, [ WorkType(color.X), WorkType(color.Y), WorkType(color.Z) ]);\n+\n+        static if(To.linear == false)\n+        {\n+            v[0] = toGamma!(To.colorSpace)(v[0]);\n+            v[1] = toGamma!(To.colorSpace)(v[1]);\n+            v[2] = toGamma!(To.colorSpace)(v[2]);\n+        }\n+\n+        return To(convertPixelType!ToType(v[0]), convertPixelType!ToType(v[1]), convertPixelType!ToType(v[2]));\n+    }\n+\n+    // *** xyY triplet ***\n+    else static if(isxyY!From && isxyY!To)\n+    {\n+        alias F = To.ComponentType;\n+        return To(F(color.x), F(color.y), F(color.Y));\n+    }\n+    else static if(isxyY!From && isXYZ!To)\n+    {\n+        alias F = To.ComponentType;\n+        if(color.y == F(0))\n+            return To(F(0), F(0), F(0));\n+        else\n+            return To(F(color.x*color.Y/color.y), F(color.Y), F((F(1)-color.x-color.y)*color.Y/color.y));\n+    }\n+    else static if(isXYZ!From && isxyY!To)\n+    {\n+        alias F = To.ComponentType;\n+        auto sum = color.X + color.Y + color.Z;\n+        if(sum == F(0))\n+            return To(WhitePoint!F.D65.x, WhitePoint!F.D65.y, F(0));\n+        else\n+            return To(F(color.X/sum), F(color.Y/sum), F(color.Y));\n+    }\n+\n+    // *** fallback plan ***\n+    else\n+    {\n+        // cast along a conversion path to reach our target conversion\n+        alias Path = ConversionPath!(From, To);\n+        return convertColor!To(convertColor!(Path[0])(color));\n+    }\n+}\n+\n+unittest\n+{\n+    import std.experimental.color.xyz;\n+\n+    // test format conversions\n+    alias UnsignedRGB = RGB!(\"rgb\", ubyte);\n+    alias SignedRGBX = RGB!(\"rgbx\", byte);\n+    alias FloatRGBA = RGB!(\"rgba\", float);\n+\n+    static assert(cast(UnsignedRGB)SignedRGBX(0x20,0x30,-10)               == UnsignedRGB(0x40,0x60,0));\n+    static assert(cast(UnsignedRGB)FloatRGBA(1,0.5,0,1)                    == UnsignedRGB(0xFF,0x80,0));\n+    static assert(cast(UnsignedRGB)cast(FloatRGBA)UnsignedRGB(0xFF,0x80,0) == UnsignedRGB(0xFF,0x80,0));\n+    static assert(cast(FloatRGBA)UnsignedRGB(0xFF,0x80,0)                  == FloatRGBA(1,float(0x80)/float(0xFF),0,0));\n+    static assert(cast(FloatRGBA)SignedRGBX(127,-127,-128)                 == FloatRGBA(1,-1,-1,0));\n+\n+    // test greyscale conversion\n+    alias UnsignedL = RGB!(\"l\", ubyte);\n+    assert(cast(UnsignedL)UnsignedRGB(0xFF,0x20,0x40)   == UnsignedL(0x83));\n+\n+    // alias a bunch of types for testing\n+    alias sRGBA = RGB!(\"rgba\", ubyte, false, RGBColorSpace.sRGB);\n+    alias lRGBA = RGB!(\"rgba\", ushort, true, RGBColorSpace.sRGB);\n+    alias gRGBA = RGB!(\"rgba\", byte, false, RGBColorSpace.sRGB_Gamma2_2);\n+    alias sRGBAf = RGB!(\"rgba\", float, false, RGBColorSpace.sRGB);\n+    alias lRGBAf = RGB!(\"rgba\", double, true, RGBColorSpace.sRGB);\n+    alias gRGBAf = RGB!(\"rgba\", float, false, RGBColorSpace.sRGB_Gamma2_2);\n+    alias XYZf = XYZ!float;\n+\n+    // TODO... we can't test this properly since DMD can't CTFE the '^^' operator! >_<\n+\n+    // test RGB conversions\n+    assert(cast(lRGBA)sRGBA(0xFF, 0xFF, 0xFF, 0xFF)           == lRGBA(0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF));\n+    assert(cast(gRGBA)sRGBA(0xFF, 0x80, 0x01, 0xFF)           == gRGBA(0x7F, 0x3F, 0x03, 0x7F));\n+    assert(cast(sRGBA)cast(XYZf)sRGBA(0xFF, 0xFF, 0xFF, 0xFF) == sRGBA(0xFF, 0xFF, 0xFF, 0));\n+    //...\n+\n+    // test PackedRGB conversions\n+    //...\n+\n+    // test xyY conversions\n+    //...\n+}\n+\n+\n+/**\n+* Create a color from hex strings in the standard forms: (#/$/0x)rgb/argb/rrggbb/aarrggbb\n+*/\n+Color colorFromString(Color = RGB8)(const(char)[] hex)","path":"std/experimental/color/conv.d","position":240,"original_position":240,"commit_id":"f2c2ec58c104f6b2104ae4f1144df451d9222b78","original_commit_id":"f2c2ec58c104f6b2104ae4f1144df451d9222b78","user":{"login":"burner","id":13327,"avatar_url":"https://avatars.githubusercontent.com/u/13327?v=3","gravatar_id":"","url":"https://api.github.com/users/burner","html_url":"https://github.com/burner","followers_url":"https://api.github.com/users/burner/followers","following_url":"https://api.github.com/users/burner/following{/other_user}","gists_url":"https://api.github.com/users/burner/gists{/gist_id}","starred_url":"https://api.github.com/users/burner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burner/subscriptions","organizations_url":"https://api.github.com/users/burner/orgs","repos_url":"https://api.github.com/users/burner/repos","events_url":"https://api.github.com/users/burner/events{/privacy}","received_events_url":"https://api.github.com/users/burner/received_events","type":"User","site_admin":false},"body":"shouldn't this also accept wchar and dchar","created_at":"2015-06-23T18:52:06Z","updated_at":"2015-06-23T18:52:06Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r33077469","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/33077469"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845#discussion_r33077469"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845","id":26891491,"html_url":"https://github.com/D-Programming-Language/phobos/pull/2845","diff_url":"https://github.com/D-Programming-Language/phobos/pull/2845.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/2845.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845","number":2845,"state":"open","locked":false,"title":"Added std.experimental.color","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"body":"There's talk about adding a std.colour type, here's a starting point for consideration.\r\nKnows about colour space and comprehensive format conversions.\r\nMore common colour spaces to come.","created_at":"2015-01-06T14:26:36Z","updated_at":"2015-06-23T18:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"867e1736a7fe787482cd9811edb68a042d477e3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/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/2845/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/f2c2ec58c104f6b2104ae4f1144df451d9222b78","head":{"label":"TurkeyMan:colour","ref":"colour","sha":"f2c2ec58c104f6b2104ae4f1144df451d9222b78","user":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"repo":{"id":3272507,"name":"phobos","full_name":"TurkeyMan/phobos","owner":{"login":"TurkeyMan","id":1146706,"avatar_url":"https://avatars.githubusercontent.com/u/1146706?v=3","gravatar_id":"","url":"https://api.github.com/users/TurkeyMan","html_url":"https://github.com/TurkeyMan","followers_url":"https://api.github.com/users/TurkeyMan/followers","following_url":"https://api.github.com/users/TurkeyMan/following{/other_user}","gists_url":"https://api.github.com/users/TurkeyMan/gists{/gist_id}","starred_url":"https://api.github.com/users/TurkeyMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurkeyMan/subscriptions","organizations_url":"https://api.github.com/users/TurkeyMan/orgs","repos_url":"https://api.github.com/users/TurkeyMan/repos","events_url":"https://api.github.com/users/TurkeyMan/events{/privacy}","received_events_url":"https://api.github.com/users/TurkeyMan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TurkeyMan/phobos","description":"Runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/TurkeyMan/phobos","forks_url":"https://api.github.com/repos/TurkeyMan/phobos/forks","keys_url":"https://api.github.com/repos/TurkeyMan/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TurkeyMan/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TurkeyMan/phobos/teams","hooks_url":"https://api.github.com/repos/TurkeyMan/phobos/hooks","issue_events_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/TurkeyMan/phobos/events","assignees_url":"https://api.github.com/repos/TurkeyMan/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/TurkeyMan/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/TurkeyMan/phobos/tags","blobs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TurkeyMan/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TurkeyMan/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/TurkeyMan/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TurkeyMan/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/TurkeyMan/phobos/languages","stargazers_url":"https://api.github.com/repos/TurkeyMan/phobos/stargazers","contributors_url":"https://api.github.com/repos/TurkeyMan/phobos/contributors","subscribers_url":"https://api.github.com/repos/TurkeyMan/phobos/subscribers","subscription_url":"https://api.github.com/repos/TurkeyMan/phobos/subscription","commits_url":"https://api.github.com/repos/TurkeyMan/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/TurkeyMan/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/TurkeyMan/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/TurkeyMan/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/TurkeyMan/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/TurkeyMan/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TurkeyMan/phobos/merges","archive_url":"https://api.github.com/repos/TurkeyMan/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TurkeyMan/phobos/downloads","issues_url":"https://api.github.com/repos/TurkeyMan/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/TurkeyMan/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/TurkeyMan/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/TurkeyMan/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TurkeyMan/phobos/labels{/name}","releases_url":"https://api.github.com/repos/TurkeyMan/phobos/releases{/id}","created_at":"2012-01-26T09:23:24Z","updated_at":"2015-01-10T02:32:11Z","pushed_at":"2015-06-23T14:42:55Z","git_url":"git://github.com/TurkeyMan/phobos.git","ssh_url":"git@github.com:TurkeyMan/phobos.git","clone_url":"https://github.com/TurkeyMan/phobos.git","svn_url":"https://github.com/TurkeyMan/phobos","homepage":"d-programming-language.org","size":43282,"stargazers_count":6,"watchers_count":6,"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":6,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"693bf111bda9d993fdf88fa685d83a23875c2992","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-06-17T14:55:53Z","pushed_at":"2015-06-23T17:45:31Z","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":85999,"stargazers_count":609,"watchers_count":609,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":408,"mirror_url":null,"open_issues_count":77,"forks":408,"open_issues":77,"watchers":609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/2845"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/2845/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/2845/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/2845/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/f2c2ec58c104f6b2104ae4f1144df451d9222b78"}}}}