-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to deal with null
return values
#20
Comments
This is complicated by the fact that we can't just use |
Alternatively we could change our definition of This is better than See https://docs.microsoft.com/en-us/uwp/api/windows.storage.istorageitem2#Windows_Storage_IStorageItem2_GetParentAsync for an example of a method where it is explicitly documented that it can return |
null
return values
Another thing: null return values can only happen for interface return values (and |
An interesting special case might be the async task results. Maybe we can assume that a returned |
Since we can't be sure whether interface return values are never
null
, we probably have to check that and return anOption<ComPtr<...>>
instead. We should try to make use of the null-pointer optimization here, so there will be no unnecessary overhead.The text was updated successfully, but these errors were encountered: