{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/dmd/pulls/comments/200241682","pull_request_review_id":134517419,"id":200241682,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDI0MTY4Mg==","diff_hunk":"@@ -760,3 +760,37 @@ version(Windows)\n       \"??$test19043b@U?$test19043@$$CBD@@@@YAXU?$test19043@$$CBD@@@Z\");\n }\n \n+/*****************************************/\n+// https://issues.dlang.org/show_bug.cgi?id=18716\n+// D slices as parameters in extern(C++) functions\n+\n+struct Test18716 {}\n+struct __dslice(T) {}\n+\n+extern(C++) void test18716a(char[]);\n+extern(C++) void test18716b(__dslice!char);\n+extern(C++) void test18716c(const(char)[]);\n+extern(C++) void test18716d(Test18716[]);\n+\n+void test18716()\n+{\n+    test18716a(\"foo\".dup);\n+    test18716c(\"foo\");\n+    test18716d([Test18716()]);","path":"test/compilable/cppmangle.d","position":20,"original_position":20,"commit_id":"7dbab203152e5485902c3f769e36f71f4eb5da9d","original_commit_id":"7dbab203152e5485902c3f769e36f71f4eb5da9d","user":{"login":"thewilsonator","id":6802489,"node_id":"MDQ6VXNlcjY4MDI0ODk=","avatar_url":"https://avatars2.githubusercontent.com/u/6802489?v=4","gravatar_id":"","url":"https://api.github.com/users/thewilsonator","html_url":"https://github.com/thewilsonator","followers_url":"https://api.github.com/users/thewilsonator/followers","following_url":"https://api.github.com/users/thewilsonator/following{/other_user}","gists_url":"https://api.github.com/users/thewilsonator/gists{/gist_id}","starred_url":"https://api.github.com/users/thewilsonator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thewilsonator/subscriptions","organizations_url":"https://api.github.com/users/thewilsonator/orgs","repos_url":"https://api.github.com/users/thewilsonator/repos","events_url":"https://api.github.com/users/thewilsonator/events{/privacy}","received_events_url":"https://api.github.com/users/thewilsonator/received_events","type":"User","site_admin":false},"body":"Got it!\r\n\r\n```diff\r\n    void mangleIdent(Dsymbol sym, bool dont_use_back_reference = false)\r\n    {\r\n        // <qualified name> ::= <sub-name list> @\r\n        // <sub-name list>  ::= <sub-name> <name parts>\r\n        //                  ::= <sub-name>\r\n        // <sub-name> ::= <identifier> @\r\n        //            ::= ?$ <identifier> @ <template args> @\r\n        //            :: <back reference>\r\n        // <back reference> ::= 0-9\r\n        // <template args> ::= <template arg> <template args>\r\n        //                ::= <template arg>\r\n        // <template arg>  ::= <type>\r\n        //                ::= $0<encoded integral number>\r\n        //printf(\"mangleIdent('%s')\\n\", sym.toChars());\r\n        Dsymbol p = sym;\r\n-        if (p.toParent() && p.toParent().isTemplateInstance())\r\n+        if (p && p.toParent() && p.toParent().isTemplateInstance())\r\n        {\r\n            p = p.toParent();\r\n        }\r\n        while (p && !p.isModule())\r\n        {\r\n            mangleName(p, dont_use_back_reference);\r\n            p = p.toParent();\r\n            if (p.toParent() && p.toParent().isTemplateInstance())\r\n            {\r\n                p = p.toParent();\r\n            }\r\n        }\r\n        if (!dont_use_back_reference)\r\n            buf.writeByte('@');\r\n    }\r\n```\r\n","created_at":"2018-07-05T06:13:41Z","updated_at":"2018-07-05T06:13:42Z","html_url":"https://github.com/dlang/dmd/pull/8120#discussion_r200241682","pull_request_url":"https://api.github.com/repos/dlang/dmd/pulls/8120","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments/200241682"},"html":{"href":"https://github.com/dlang/dmd/pull/8120#discussion_r200241682"},"pull_request":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8120"}},"in_reply_to_id":200226890},"pull_request":{"url":"https://api.github.com/repos/dlang/dmd/pulls/8120","id":179190507,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc5MTkwNTA3","html_url":"https://github.com/dlang/dmd/pull/8120","diff_url":"https://github.com/dlang/dmd/pull/8120.diff","patch_url":"https://github.com/dlang/dmd/pull/8120.patch","issue_url":"https://api.github.com/repos/dlang/dmd/issues/8120","number":8120,"state":"open","locked":false,"title":"Fix issue 18716: type `const(char)[]` can not be mapped to C++","user":{"login":"jacob-carlborg","id":306980,"node_id":"MDQ6VXNlcjMwNjk4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/306980?v=4","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"body":"D arrays don't have any corresponding type in C++. Instead we mangle it as a templated struct with the name `__dslice`, i.e. `struct __dslice(T)`, where `T` is the element type of the array. For an array of ints it would be mangled as the following type: `__dslice!int`.\r\n\r\nReboot of #7893.\r\n\r\n@WalterBright this should interesting for you since you want to kill C string in DMD.","created_at":"2018-04-03T19:02:49Z","updated_at":"2018-07-05T06:13:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e20c401cdc6a155d7a02ceab7229a9e3b2f061d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"klickverbot","id":19335,"node_id":"MDQ6VXNlcjE5MzM1","avatar_url":"https://avatars1.githubusercontent.com/u/19335?v=4","gravatar_id":"","url":"https://api.github.com/users/klickverbot","html_url":"https://github.com/klickverbot","followers_url":"https://api.github.com/users/klickverbot/followers","following_url":"https://api.github.com/users/klickverbot/following{/other_user}","gists_url":"https://api.github.com/users/klickverbot/gists{/gist_id}","starred_url":"https://api.github.com/users/klickverbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klickverbot/subscriptions","organizations_url":"https://api.github.com/users/klickverbot/orgs","repos_url":"https://api.github.com/users/klickverbot/repos","events_url":"https://api.github.com/users/klickverbot/events{/privacy}","received_events_url":"https://api.github.com/users/klickverbot/received_events","type":"User","site_admin":false},{"login":"ibuclaw","id":397929,"node_id":"MDQ6VXNlcjM5NzkyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/397929?v=4","gravatar_id":"","url":"https://api.github.com/users/ibuclaw","html_url":"https://github.com/ibuclaw","followers_url":"https://api.github.com/users/ibuclaw/followers","following_url":"https://api.github.com/users/ibuclaw/following{/other_user}","gists_url":"https://api.github.com/users/ibuclaw/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuclaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuclaw/subscriptions","organizations_url":"https://api.github.com/users/ibuclaw/orgs","repos_url":"https://api.github.com/users/ibuclaw/repos","events_url":"https://api.github.com/users/ibuclaw/events{/privacy}","received_events_url":"https://api.github.com/users/ibuclaw/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":537492633,"node_id":"MDU6TGFiZWw1Mzc0OTI2MzM=","url":"https://api.github.com/repos/dlang/dmd/labels/Bug%20Fix","name":"Bug Fix","color":"0052cc","default":false},{"id":119377341,"node_id":"MDU6TGFiZWwxMTkzNzczNDE=","url":"https://api.github.com/repos/dlang/dmd/labels/Enhancement","name":"Enhancement","color":"0052cc","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/dmd/pulls/8120/commits","review_comments_url":"https://api.github.com/repos/dlang/dmd/pulls/8120/comments","review_comment_url":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/dmd/issues/8120/comments","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/7dbab203152e5485902c3f769e36f71f4eb5da9d","head":{"label":"jacob-carlborg:18716-dslice-cpp","ref":"18716-dslice-cpp","sha":"7dbab203152e5485902c3f769e36f71f4eb5da9d","user":{"login":"jacob-carlborg","id":306980,"node_id":"MDQ6VXNlcjMwNjk4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/306980?v=4","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"repo":{"id":3755857,"node_id":"MDEwOlJlcG9zaXRvcnkzNzU1ODU3","name":"dmd","full_name":"jacob-carlborg/dmd","owner":{"login":"jacob-carlborg","id":306980,"node_id":"MDQ6VXNlcjMwNjk4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/306980?v=4","gravatar_id":"","url":"https://api.github.com/users/jacob-carlborg","html_url":"https://github.com/jacob-carlborg","followers_url":"https://api.github.com/users/jacob-carlborg/followers","following_url":"https://api.github.com/users/jacob-carlborg/following{/other_user}","gists_url":"https://api.github.com/users/jacob-carlborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jacob-carlborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacob-carlborg/subscriptions","organizations_url":"https://api.github.com/users/jacob-carlborg/orgs","repos_url":"https://api.github.com/users/jacob-carlborg/repos","events_url":"https://api.github.com/users/jacob-carlborg/events{/privacy}","received_events_url":"https://api.github.com/users/jacob-carlborg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacob-carlborg/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/jacob-carlborg/dmd","forks_url":"https://api.github.com/repos/jacob-carlborg/dmd/forks","keys_url":"https://api.github.com/repos/jacob-carlborg/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacob-carlborg/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacob-carlborg/dmd/teams","hooks_url":"https://api.github.com/repos/jacob-carlborg/dmd/hooks","issue_events_url":"https://api.github.com/repos/jacob-carlborg/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/jacob-carlborg/dmd/events","assignees_url":"https://api.github.com/repos/jacob-carlborg/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/jacob-carlborg/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/jacob-carlborg/dmd/tags","blobs_url":"https://api.github.com/repos/jacob-carlborg/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacob-carlborg/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacob-carlborg/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacob-carlborg/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacob-carlborg/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/jacob-carlborg/dmd/languages","stargazers_url":"https://api.github.com/repos/jacob-carlborg/dmd/stargazers","contributors_url":"https://api.github.com/repos/jacob-carlborg/dmd/contributors","subscribers_url":"https://api.github.com/repos/jacob-carlborg/dmd/subscribers","subscription_url":"https://api.github.com/repos/jacob-carlborg/dmd/subscription","commits_url":"https://api.github.com/repos/jacob-carlborg/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacob-carlborg/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacob-carlborg/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacob-carlborg/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacob-carlborg/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/jacob-carlborg/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacob-carlborg/dmd/merges","archive_url":"https://api.github.com/repos/jacob-carlborg/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacob-carlborg/dmd/downloads","issues_url":"https://api.github.com/repos/jacob-carlborg/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/jacob-carlborg/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/jacob-carlborg/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/jacob-carlborg/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacob-carlborg/dmd/labels{/name}","releases_url":"https://api.github.com/repos/jacob-carlborg/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/jacob-carlborg/dmd/deployments","created_at":"2012-03-18T15:39:36Z","updated_at":"2017-05-05T20:44:58Z","pushed_at":"2018-07-04T19:04:57Z","git_url":"git://github.com/jacob-carlborg/dmd.git","ssh_url":"git@github.com:jacob-carlborg/dmd.git","clone_url":"https://github.com/jacob-carlborg/dmd.git","svn_url":"https://github.com/jacob-carlborg/dmd","homepage":"d-programming-language.org","size":87406,"stargazers_count":9,"watchers_count":9,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":9,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"8d0f6aff310454b5de3a4ad1e48b76576f3ed8ba","user":{"login":"dlang","id":565913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NTkxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","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":1257070,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU3MDcw","name":"dmd","full_name":"dlang/dmd","owner":{"login":"dlang","id":565913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NTkxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","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/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/dlang/dmd","forks_url":"https://api.github.com/repos/dlang/dmd/forks","keys_url":"https://api.github.com/repos/dlang/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/dmd/teams","hooks_url":"https://api.github.com/repos/dlang/dmd/hooks","issue_events_url":"https://api.github.com/repos/dlang/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/dmd/events","assignees_url":"https://api.github.com/repos/dlang/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/dmd/tags","blobs_url":"https://api.github.com/repos/dlang/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/dmd/languages","stargazers_url":"https://api.github.com/repos/dlang/dmd/stargazers","contributors_url":"https://api.github.com/repos/dlang/dmd/contributors","subscribers_url":"https://api.github.com/repos/dlang/dmd/subscribers","subscription_url":"https://api.github.com/repos/dlang/dmd/subscription","commits_url":"https://api.github.com/repos/dlang/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/dmd/merges","archive_url":"https://api.github.com/repos/dlang/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/dmd/downloads","issues_url":"https://api.github.com/repos/dlang/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/dmd/labels{/name}","releases_url":"https://api.github.com/repos/dlang/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/dmd/deployments","created_at":"2011-01-15T06:53:53Z","updated_at":"2018-07-05T03:39:04Z","pushed_at":"2018-07-05T06:12:48Z","git_url":"git://github.com/dlang/dmd.git","ssh_url":"git@github.com:dlang/dmd.git","clone_url":"https://github.com/dlang/dmd.git","svn_url":"https://github.com/dlang/dmd","homepage":"dlang.org","size":91299,"stargazers_count":1813,"watchers_count":1813,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":453,"mirror_url":null,"archived":false,"open_issues_count":126,"license":{"key":"bsl-1.0","name":"Boost Software License 1.0","spdx_id":"BSL-1.0","url":"https://api.github.com/licenses/bsl-1.0","node_id":"MDc6TGljZW5zZTI4"},"forks":453,"open_issues":126,"watchers":1813,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8120"},"html":{"href":"https://github.com/dlang/dmd/pull/8120"},"issue":{"href":"https://api.github.com/repos/dlang/dmd/issues/8120"},"comments":{"href":"https://api.github.com/repos/dlang/dmd/issues/8120/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8120/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8120/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/dmd/statuses/7dbab203152e5485902c3f769e36f71f4eb5da9d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"thewilsonator"}}