{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/10885","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/10885/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/10885/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/10885/events","html_url":"https://github.com/ARMmbed/mbed-os/pull/10885","id":459809367,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkxMDY2NTky","number":10885,"title":"Reduce Callback.h using C++11","user":{"login":"kjbracey-arm","id":11025917,"node_id":"MDQ6VXNlcjExMDI1OTE3","avatar_url":"https://avatars3.githubusercontent.com/u/11025917?v=4","gravatar_id":"","url":"https://api.github.com/users/kjbracey-arm","html_url":"https://github.com/kjbracey-arm","followers_url":"https://api.github.com/users/kjbracey-arm/followers","following_url":"https://api.github.com/users/kjbracey-arm/following{/other_user}","gists_url":"https://api.github.com/users/kjbracey-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/kjbracey-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjbracey-arm/subscriptions","organizations_url":"https://api.github.com/users/kjbracey-arm/orgs","repos_url":"https://api.github.com/users/kjbracey-arm/repos","events_url":"https://api.github.com/users/kjbracey-arm/events{/privacy}","received_events_url":"https://api.github.com/users/kjbracey-arm/received_events","type":"User","site_admin":false},"labels":[{"id":147112891,"node_id":"MDU6TGFiZWwxNDcxMTI4OTE=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20review","name":"needs: review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2019-06-24T10:18:45Z","updated_at":"2019-06-25T07:03:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/10885","html_url":"https://github.com/ARMmbed/mbed-os/pull/10885","diff_url":"https://github.com/ARMmbed/mbed-os/pull/10885.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/10885.patch"},"body":"\r\n### Description\r\n\r\nThe bulk of Callback.h was auto-generated as 6 specialisations, handling zero to five arguments.\r\n\r\nThis can now be handled without specialisation using C++11 variadic templates, reducing the file from 4,900 lines to 900 lines.\r\n\r\nThis should reduce compilation time, and offset potential increases from use of `<type_traits>` or a local `mbed_cxxsupport.h` equivalent.\r\n\r\nSeveral other improvents to `Callback` are possible and/or desirable with C++11, such as the ability to store lambdas, but this commit is purely the variadic simplification.\r\n\r\n### Pull request type\r\n\r\n    [ ] Fix\r\n    [X] Refactor\r\n    [ ] Target update\r\n    [ ] Functionality change\r\n    [ ] Docs update\r\n    [ ] Test update\r\n    [ ] Breaking change\r\n\r\n### Reviewers\r\n\r\n@pan-, @bulislaw, @geky\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/505315086","html_url":"https://github.com/ARMmbed/mbed-os/pull/10885#issuecomment-505315086","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/10885","id":505315086,"node_id":"MDEyOklzc3VlQ29tbWVudDUwNTMxNTA4Ng==","user":{"login":"kjbracey-arm","id":11025917,"node_id":"MDQ6VXNlcjExMDI1OTE3","avatar_url":"https://avatars3.githubusercontent.com/u/11025917?v=4","gravatar_id":"","url":"https://api.github.com/users/kjbracey-arm","html_url":"https://github.com/kjbracey-arm","followers_url":"https://api.github.com/users/kjbracey-arm/followers","following_url":"https://api.github.com/users/kjbracey-arm/following{/other_user}","gists_url":"https://api.github.com/users/kjbracey-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/kjbracey-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjbracey-arm/subscriptions","organizations_url":"https://api.github.com/users/kjbracey-arm/orgs","repos_url":"https://api.github.com/users/kjbracey-arm/repos","events_url":"https://api.github.com/users/kjbracey-arm/events{/privacy}","received_events_url":"https://api.github.com/users/kjbracey-arm/received_events","type":"User","site_admin":false},"created_at":"2019-06-25T07:03:00Z","updated_at":"2019-06-25T07:03:00Z","author_association":"CONTRIBUTOR","body":"> Glad to see this come in 👍\r\n\r\nNo doubt this was what you were yearning to write in the first place. The hard part was generating the C++98 version!\r\n\r\n> Hmm, Event.h and EventQueue.h are much more complex, \r\n\r\nActually, they're not so bad. I think I can remove 95% of them - it's just the innermost `struct context` that will remain specialized. I'll make a separate PR for them.\r\n"}}
{"actor":{"display_login":"kjbracey-arm"}}