{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/179","repository_url":"https://api.github.com/repos/Microsoft/xbox-live-api","labels_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/179/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/179/comments","events_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/179/events","html_url":"https://github.com/Microsoft/xbox-live-api/issues/179","id":231579854,"number":179,"title":"pplx::create_task does not compile with winrt::Windows::Foundation::IAsyncOperation return type","user":{"login":"jorgenhs","id":5943054,"avatar_url":"https://avatars3.githubusercontent.com/u/5943054?v=4","gravatar_id":"","url":"https://api.github.com/users/jorgenhs","html_url":"https://github.com/jorgenhs","followers_url":"https://api.github.com/users/jorgenhs/followers","following_url":"https://api.github.com/users/jorgenhs/following{/other_user}","gists_url":"https://api.github.com/users/jorgenhs/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgenhs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgenhs/subscriptions","organizations_url":"https://api.github.com/users/jorgenhs/orgs","repos_url":"https://api.github.com/users/jorgenhs/repos","events_url":"https://api.github.com/users/jorgenhs/events{/privacy}","received_events_url":"https://api.github.com/users/jorgenhs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-26T09:55:40Z","updated_at":"2018-03-21T16:43:36Z","closed_at":null,"author_association":"NONE","body":"pplx::create_task does not support cppwinrt IAsyncOperation types when programming with the XDK. The following code does *not* compile (the return type of pplx::create_task resolves to _BadResultType):\r\n\r\n  typedef winrt::SomeXDKResultType TokenResult;\r\n  TokenResult tokenResult = nullptr;\r\n  pplx::task<TokenResult> t = pplx::create_task(firstUser.SomeXDKFunction(TEXT(\"POST\"), *uri, TEXT(\"\")))\r\n  .then([&](pplx::task<TokenResult> tokenTask) { ...\r\n\r\nThe following code compiles, but requires regular winrt:\r\n\r\n  typedef SomeXDKResultType^ TokenResult;\r\n  TokenResult tokenResult;\r\n  pplx::task<TokenResult> t = pplx::create_task(firstUser->SomeXDKFunction(ref new Platform::String(TEXT(\"POST\")), ref new Platform::String(*uri), ref new Platform::String(TEXT(\"\"))))\r\n  .then([&](pplx::task<TokenResult> tokenTask) {...\r\n\r\nInterop with cppwinrt would be quite useful in many Xbox Live programming scenarios."},"comment":{"url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/comments/375011694","html_url":"https://github.com/Microsoft/xbox-live-api/issues/179#issuecomment-375011694","issue_url":"https://api.github.com/repos/Microsoft/xbox-live-api/issues/179","id":375011694,"user":{"login":"jameslen-atg","id":24258495,"avatar_url":"https://avatars1.githubusercontent.com/u/24258495?v=4","gravatar_id":"","url":"https://api.github.com/users/jameslen-atg","html_url":"https://github.com/jameslen-atg","followers_url":"https://api.github.com/users/jameslen-atg/followers","following_url":"https://api.github.com/users/jameslen-atg/following{/other_user}","gists_url":"https://api.github.com/users/jameslen-atg/gists{/gist_id}","starred_url":"https://api.github.com/users/jameslen-atg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameslen-atg/subscriptions","organizations_url":"https://api.github.com/users/jameslen-atg/orgs","repos_url":"https://api.github.com/users/jameslen-atg/repos","events_url":"https://api.github.com/users/jameslen-atg/events{/privacy}","received_events_url":"https://api.github.com/users/jameslen-atg/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T16:43:36Z","updated_at":"2018-03-21T16:43:36Z","author_association":"MEMBER","body":"You have 2 options here:\r\n1) You can use the C++/WinRT projections of XSAPI and those work without /Zw\r\n2) If you stick with the C++ version of XSAPI you will need to keep /Zw due to XSAPI using WinRT types (with hats) under to hood and you will have to switch your platform code away from create_task and use coroutines instead. (https://www.youtube.com/watch?v=v0SjumbIips)"}}
{"actor":{"display_login":"jameslen-atg"}}