{"action":"created","issue":{"url":"https://api.github.com/repos/WG21-SG14/SG14/issues/128","repository_url":"https://api.github.com/repos/WG21-SG14/SG14","labels_url":"https://api.github.com/repos/WG21-SG14/SG14/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/WG21-SG14/SG14/issues/128/comments","events_url":"https://api.github.com/repos/WG21-SG14/SG14/issues/128/events","html_url":"https://github.com/WG21-SG14/SG14/issues/128","id":312233982,"node_id":"MDU6SXNzdWUzMTIyMzM5ODI=","number":128,"title":"inplace_function move constructor should be noexcept","user":{"login":"Quuxplusone","id":702021,"node_id":"MDQ6VXNlcjcwMjAyMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/702021?v=4","gravatar_id":"","url":"https://api.github.com/users/Quuxplusone","html_url":"https://github.com/Quuxplusone","followers_url":"https://api.github.com/users/Quuxplusone/followers","following_url":"https://api.github.com/users/Quuxplusone/following{/other_user}","gists_url":"https://api.github.com/users/Quuxplusone/gists{/gist_id}","starred_url":"https://api.github.com/users/Quuxplusone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quuxplusone/subscriptions","organizations_url":"https://api.github.com/users/Quuxplusone/orgs","repos_url":"https://api.github.com/users/Quuxplusone/repos","events_url":"https://api.github.com/users/Quuxplusone/events{/privacy}","received_events_url":"https://api.github.com/users/Quuxplusone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-07T19:07:33Z","updated_at":"2018-09-15T20:31:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Right now, the following program performs poorly:\r\nhttps://wandbox.org/permlink/vLEl9Owmp1exrkKA\r\n\r\n    struct Widget {\r\n        Widget() {}\r\n        Widget(Widget&&) noexcept { puts(\"move\"); }\r\n        Widget(const Widget&) noexcept { puts(\"copy\"); }\r\n    };\r\n\r\n    auto f = [w = Widget()]() {};\r\n    using IPF = stdext::inplace_function<void(), 32>;\r\n    std::vector<IPF> v;\r\n    v.emplace_back(f);\r\n    v.emplace_back(f);\r\n    [...]\r\n\r\nThe vector resize does `copy` instead of `move`, because `inplace_function`'s move constructor is not marked `noexcept`, and vector is pessimized in that case.\r\n\r\nI'd like to see us explicitly drop support for non-noexcept-moveable types, preferably by specifying that the move constructor will call `std::terminate` if the wrapped object throws during its move-construction. Then the patch to de-pessimize the vector code above would be a single keyword: just add `noexcept` to the move constructor. (And to `swap`; and optionally to move-assignment.)\r\n\r\n@carlcook thoughts?"},"comment":{"url":"https://api.github.com/repos/WG21-SG14/SG14/issues/comments/421630069","html_url":"https://github.com/WG21-SG14/SG14/issues/128#issuecomment-421630069","issue_url":"https://api.github.com/repos/WG21-SG14/SG14/issues/128","id":421630069,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTYzMDA2OQ==","user":{"login":"p-groarke","id":156883,"node_id":"MDQ6VXNlcjE1Njg4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/156883?v=4","gravatar_id":"","url":"https://api.github.com/users/p-groarke","html_url":"https://github.com/p-groarke","followers_url":"https://api.github.com/users/p-groarke/followers","following_url":"https://api.github.com/users/p-groarke/following{/other_user}","gists_url":"https://api.github.com/users/p-groarke/gists{/gist_id}","starred_url":"https://api.github.com/users/p-groarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p-groarke/subscriptions","organizations_url":"https://api.github.com/users/p-groarke/orgs","repos_url":"https://api.github.com/users/p-groarke/repos","events_url":"https://api.github.com/users/p-groarke/events{/privacy}","received_events_url":"https://api.github.com/users/p-groarke/received_events","type":"User","site_admin":false},"created_at":"2018-09-15T20:31:16Z","updated_at":"2018-09-15T20:31:16Z","author_association":"NONE","body":"#believedwrong :D\r\n\r\nThanks so much for helping me wrap my head around this stuff. Keep up the great work, sg14 proposals (and headers) are awesome and give me a lot of hope for the future of c++ in high-perf applications.\r\n\r\nHave a great day!"}}
{"actor":{"display_login":"p-groarke"}}