Commit 47844d92 authored by Anthony Shoumikhin's avatar Anthony Shoumikhin Committed by Facebook GitHub Bot

Fix compilation issues on Apple platforms. (#1641)

Summary:
Pull Request resolved: https://github.com/facebook/folly/pull/1641

There's a bug in C++ SDK shipped on Apple platforms that marks `std::optional`'s `value()` as unavailable. To resolve that we should use `operator*` instead.

Reviewed By: tcw165

Differential Revision: D30755147

fbshipit-source-id: 4edcf60a7d29abe7eaddceb66501535031553678
parent 69100695
......@@ -96,7 +96,7 @@ class AsyncPipe {
if (onClosed != nullptr) {
cancellationSource.emplace();
onClosedCallback = std::make_unique<OnClosedCallback>(
cancellationSource.value(), std::move(onClosed));
*cancellationSource, std::move(onClosed));
}
auto guard =
folly::makeGuard([cancellationSource = std::move(cancellationSource)] {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment