{"action":"created","issue":{"url":"https://api.github.com/repos/google/fruit/issues/68","repository_url":"https://api.github.com/repos/google/fruit","labels_url":"https://api.github.com/repos/google/fruit/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/google/fruit/issues/68/comments","events_url":"https://api.github.com/repos/google/fruit/issues/68/events","html_url":"https://github.com/google/fruit/issues/68","id":344350820,"node_id":"MDU6SXNzdWUzNDQzNTA4MjA=","number":68,"title":"Support std::function in all component providers","user":{"login":"krojew","id":1268573,"node_id":"MDQ6VXNlcjEyNjg1NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1268573?v=4","gravatar_id":"","url":"https://api.github.com/users/krojew","html_url":"https://github.com/krojew","followers_url":"https://api.github.com/users/krojew/followers","following_url":"https://api.github.com/users/krojew/following{/other_user}","gists_url":"https://api.github.com/users/krojew/gists{/gist_id}","starred_url":"https://api.github.com/users/krojew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krojew/subscriptions","organizations_url":"https://api.github.com/users/krojew/orgs","repos_url":"https://api.github.com/users/krojew/repos","events_url":"https://api.github.com/users/krojew/events{/privacy}","received_events_url":"https://api.github.com/users/krojew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-07-25T08:51:31Z","updated_at":"2018-09-11T20:46:48Z","closed_at":null,"author_association":"NONE","body":"Currently each time a component-providing function is required, its type is enforced to be a pointer to a function with optional list of arguments to be forwarded. This is very inconvenient since it effectively re-invents std::function, but requires manually providing context for the call. This also implies manual lifetime management of the context. It would be great to be able to use std::function in such cases. There's nothing more convenient than writing a simple lambda which returns a component."},"comment":{"url":"https://api.github.com/repos/google/fruit/issues/comments/420419746","html_url":"https://github.com/google/fruit/issues/68#issuecomment-420419746","issue_url":"https://api.github.com/repos/google/fruit/issues/68","id":420419746,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDQxOTc0Ng==","user":{"login":"poletti-marco","id":1547799,"node_id":"MDQ6VXNlcjE1NDc3OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1547799?v=4","gravatar_id":"","url":"https://api.github.com/users/poletti-marco","html_url":"https://github.com/poletti-marco","followers_url":"https://api.github.com/users/poletti-marco/followers","following_url":"https://api.github.com/users/poletti-marco/following{/other_user}","gists_url":"https://api.github.com/users/poletti-marco/gists{/gist_id}","starred_url":"https://api.github.com/users/poletti-marco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poletti-marco/subscriptions","organizations_url":"https://api.github.com/users/poletti-marco/orgs","repos_url":"https://api.github.com/users/poletti-marco/repos","events_url":"https://api.github.com/users/poletti-marco/events{/privacy}","received_events_url":"https://api.github.com/users/poletti-marco/received_events","type":"User","site_admin":false},"created_at":"2018-09-11T20:46:48Z","updated_at":"2018-09-11T20:46:48Z","author_association":"CONTRIBUTOR","body":"Strange. Can you reduce the non-working code to a minimal example from which you can repro, and share that here?\r\nMy example code above doesn't crash, and I've checked that valgrind reports no issues (both on a binary compiled with GCC and one compiled with Clang).\r\n\r\nOr if you can't post a full example, at least post here the Fruit-related bits (especially the functions/methods that use `fruit::createComponent()`) so I can look if I see sth that looks wrong in the code.\r\n"}}
{"actor":{"display_login":"poletti-marco"}}