{"action":"created","issue":{"url":"https://api.github.com/repos/ericniebler/meta/issues/35","repository_url":"https://api.github.com/repos/ericniebler/meta","labels_url":"https://api.github.com/repos/ericniebler/meta/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/ericniebler/meta/issues/35/comments","events_url":"https://api.github.com/repos/ericniebler/meta/issues/35/events","html_url":"https://github.com/ericniebler/meta/issues/35","id":156172244,"number":35,"title":"Request for interest in the equivalent of std::is_callable<Fn(Args...), R> in Meta","user":{"login":"viboes","id":721225,"avatar_url":"https://avatars.githubusercontent.com/u/721225?v=3","gravatar_id":"","url":"https://api.github.com/users/viboes","html_url":"https://github.com/viboes","followers_url":"https://api.github.com/users/viboes/followers","following_url":"https://api.github.com/users/viboes/following{/other_user}","gists_url":"https://api.github.com/users/viboes/gists{/gist_id}","starred_url":"https://api.github.com/users/viboes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viboes/subscriptions","organizations_url":"https://api.github.com/users/viboes/orgs","repos_url":"https://api.github.com/users/viboes/repos","events_url":"https://api.github.com/users/viboes/events{/privacy}","received_events_url":"https://api.github.com/users/viboes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-22T20:54:22Z","updated_at":"2016-05-23T19:09:49Z","closed_at":null,"body":"Hi, \r\n\r\nI need a type traits to check if a *Callable* `Fn` can be invoked with some specific parameters `Args...`and if the result is convertible to a type `R`. Something in line with `std::is_callable` but using `meta::invoke` instead of `std::invoke`.\r\n\r\nAs `meta::is_callable` is already used what would be the name of this new type trait?\r\n\r\nI would prefer to rename the current `meta::is_callable` to something else ut I don't have a good proposal. I use in my own code `is_type_constructor` as *Meta-Callables* are are functions that construct types.\r\n\r\n```c++\r\n  template <class, R = void>\r\n    struct is_callable; // not defined\r\n  template <class Fn, class ...Args, class R>\r\n    struct is_callable<Fn(Args...), R>;\r\n  template <class Sig, R = void> \r\n    constexpr bool is_callable_v = is_callable <Sig, R>::value;\r\n```\r\n\r\nIf `TC::template invoke<Xs...>` is well formed then \r\n  if `R`is `void` then `true_type`\r\n  else `std::is_convertible<meta::invoke_t<Xs...>, R>` \r\nelse `false_type`.\r\n\r\nNo conversion check is performed when `R` is `void`.\r\n\r\nBTW, in order to avoid confusion between std *Callables* and  meta *Callables* what do you think to rename *Callable* to *Meta-Callable*?\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ericniebler/meta/issues/comments/221065999","html_url":"https://github.com/ericniebler/meta/issues/35#issuecomment-221065999","issue_url":"https://api.github.com/repos/ericniebler/meta/issues/35","id":221065999,"user":{"login":"viboes","id":721225,"avatar_url":"https://avatars.githubusercontent.com/u/721225?v=3","gravatar_id":"","url":"https://api.github.com/users/viboes","html_url":"https://github.com/viboes","followers_url":"https://api.github.com/users/viboes/followers","following_url":"https://api.github.com/users/viboes/following{/other_user}","gists_url":"https://api.github.com/users/viboes/gists{/gist_id}","starred_url":"https://api.github.com/users/viboes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viboes/subscriptions","organizations_url":"https://api.github.com/users/viboes/orgs","repos_url":"https://api.github.com/users/viboes/repos","events_url":"https://api.github.com/users/viboes/events{/privacy}","received_events_url":"https://api.github.com/users/viboes/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T19:09:49Z","updated_at":"2016-05-23T19:09:49Z","body":"Originally I called it also `is_callable_with`, but I changed it to follow `std::is_callable` style. I added also the `is_convertible` check in order to be as close as possible to `std::is_callable`. I believe it doesn't hurt."}}
{"actor":{"display_login":"viboes"}}