{"action":"created","issue":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4116","repository_url":"https://api.github.com/repos/D-Programming-Language/phobos","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4116/labels{/name}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4116/comments","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4116/events","html_url":"https://github.com/D-Programming-Language/phobos/pull/4116","id":143171508,"number":4116,"title":"append to an array by emplacement","user":{"login":"cyisfor","id":1278811,"avatar_url":"https://avatars.githubusercontent.com/u/1278811?v=3","gravatar_id":"","url":"https://api.github.com/users/cyisfor","html_url":"https://github.com/cyisfor","followers_url":"https://api.github.com/users/cyisfor/followers","following_url":"https://api.github.com/users/cyisfor/following{/other_user}","gists_url":"https://api.github.com/users/cyisfor/gists{/gist_id}","starred_url":"https://api.github.com/users/cyisfor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyisfor/subscriptions","organizations_url":"https://api.github.com/users/cyisfor/orgs","repos_url":"https://api.github.com/users/cyisfor/repos","events_url":"https://api.github.com/users/cyisfor/events{/privacy}","received_events_url":"https://api.github.com/users/cyisfor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-24T07:19:43Z","updated_at":"2016-03-24T13:38:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4116","html_url":"https://github.com/D-Programming-Language/phobos/pull/4116","diff_url":"https://github.com/D-Programming-Language/phobos/pull/4116.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/4116.patch"},"body":"Appender.emplacePut, to construct elements as they are appended. Works\r\nfor classes/structs that disable their this(this) copy constructor, and\r\ncannot be copied."},"comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments/200837163","html_url":"https://github.com/D-Programming-Language/phobos/pull/4116#issuecomment-200837163","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4116","id":200837163,"user":{"login":"ZombineDev","id":3475150,"avatar_url":"https://avatars.githubusercontent.com/u/3475150?v=3","gravatar_id":"","url":"https://api.github.com/users/ZombineDev","html_url":"https://github.com/ZombineDev","followers_url":"https://api.github.com/users/ZombineDev/followers","following_url":"https://api.github.com/users/ZombineDev/following{/other_user}","gists_url":"https://api.github.com/users/ZombineDev/gists{/gist_id}","starred_url":"https://api.github.com/users/ZombineDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZombineDev/subscriptions","organizations_url":"https://api.github.com/users/ZombineDev/orgs","repos_url":"https://api.github.com/users/ZombineDev/repos","events_url":"https://api.github.com/users/ZombineDev/events{/privacy}","received_events_url":"https://api.github.com/users/ZombineDev/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T13:38:52Z","updated_at":"2016-03-24T13:38:52Z","body":"This is a very important enhancement. I think all containers should support emplacement insertion of non-copyable types.\r\nIt's important enough, that I think that support for move-only types should be part of the `OutputRange` concept/interface.\r\n\r\nBTW, in my project I added an `put(auto ref E elem)` method  for this purpouse. Internally it uses `std.algorithm.move`. It works like this:\r\n```\r\n// 1)\r\nUniqueRef!T myLvalue:\r\narr.put(myLvalue); // calls the by-ref version\r\n// internally steals the payload `T` from myLvalue\r\nassert (!myLvalue);\r\n\r\n// 2)\r\narr.put(UniqueRef!T(args); // calls the by-value version\r\n```"}}