{"action":"created","issue":{"url":"https://api.github.com/repos/dropbox/djinni/issues/157","labels_url":"https://api.github.com/repos/dropbox/djinni/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/dropbox/djinni/issues/157/comments","events_url":"https://api.github.com/repos/dropbox/djinni/issues/157/events","html_url":"https://github.com/dropbox/djinni/pull/157","id":115343670,"number":157,"title":"Potential Android compile fix","user":{"login":"pweiskircher","id":1521642,"avatar_url":"https://avatars.githubusercontent.com/u/1521642?v=3","gravatar_id":"","url":"https://api.github.com/users/pweiskircher","html_url":"https://github.com/pweiskircher","followers_url":"https://api.github.com/users/pweiskircher/followers","following_url":"https://api.github.com/users/pweiskircher/following{/other_user}","gists_url":"https://api.github.com/users/pweiskircher/gists{/gist_id}","starred_url":"https://api.github.com/users/pweiskircher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pweiskircher/subscriptions","organizations_url":"https://api.github.com/users/pweiskircher/orgs","repos_url":"https://api.github.com/users/pweiskircher/repos","events_url":"https://api.github.com/users/pweiskircher/events{/privacy}","received_events_url":"https://api.github.com/users/pweiskircher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T18:24:25Z","updated_at":"2015-11-05T19:44:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dropbox/djinni/pulls/157","html_url":"https://github.com/dropbox/djinni/pull/157","diff_url":"https://github.com/dropbox/djinni/pull/157.diff","patch_url":"https://github.com/dropbox/djinni/pull/157.patch"},"body":"Without this fix, our Android compile always failed with the following error:\r\n```\r\nIn file included from /Users/pat/Work/PSPDFKit/android/pspdfkit/jni/pspdfkit/../../../../core/PSPDFCore/generated-jni/NativeDataDescriptor.cpp:5:\r\n/Users/pat/Work/PSPDFKit/android/pspdfkit/jni/pspdfkit/../../../../core/Vendor/djinni/support-lib/jni/Marshal.hpp:265:15: error: ambiguous conversion for functional-style cast from 'CppType' (aka 'pspdfkit::oxygen::nn<std::__1::shared_ptr<PDFC::DataProvider> >') to 'CppType' (aka 'shared_ptr< ::PDFC::DataProvider>')\r\n   return j ? CppType(T::Boxed::toCpp(jniEnv, j)) : CppType();\r\n```\r\n\r\nI'm not quite sure if this is the right way to fix this but it seems to work perfectly!"},"comment":{"url":"https://api.github.com/repos/dropbox/djinni/issues/comments/154169523","html_url":"https://github.com/dropbox/djinni/pull/157#issuecomment-154169523","issue_url":"https://api.github.com/repos/dropbox/djinni/issues/157","id":154169523,"user":{"login":"mknejp","id":5156768,"avatar_url":"https://avatars.githubusercontent.com/u/5156768?v=3","gravatar_id":"","url":"https://api.github.com/users/mknejp","html_url":"https://github.com/mknejp","followers_url":"https://api.github.com/users/mknejp/followers","following_url":"https://api.github.com/users/mknejp/following{/other_user}","gists_url":"https://api.github.com/users/mknejp/gists{/gist_id}","starred_url":"https://api.github.com/users/mknejp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mknejp/subscriptions","organizations_url":"https://api.github.com/users/mknejp/orgs","repos_url":"https://api.github.com/users/mknejp/repos","events_url":"https://api.github.com/users/mknejp/events{/privacy}","received_events_url":"https://api.github.com/users/mknejp/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T19:44:04Z","updated_at":"2015-11-05T19:44:04Z","body":"The line as it is now allows for explicit conversions, so removing that might break code for someone else.\r\n\r\nTo me it looks like a problem with `pspdfkit::oxygen::nn<std::__1::shared_ptr<PDFC::DataProvider> >` as the compiler cannot properly convert it to `shared_ptr< ::PDFC::DataProvider>`. Have you looked at the conversions the compiler is trying and why it finds more than one candidate?\r\n\r\nMaybe try replacing `Cpptype(...)` with `CppType{...}` as that turns the functional-style cast to a braced-initializer? That would keep explicit conversions working."}}