X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ffutures%2FPromise.h;h=7bb58d1e8abfaa61c9ff4f9d303848472013fa8d;hb=8b51694b56db79f30fe20cb6c019d5d28c030ec4;hp=4a3f51c561e87b68f76f3cd22beb8cce7a5f6590;hpb=fbeb95acc305131b90693cdb782b7912cd80551d;p=folly.git diff --git a/folly/futures/Promise.h b/folly/futures/Promise.h index 4a3f51c5..7bb58d1e 100644 --- a/folly/futures/Promise.h +++ b/folly/futures/Promise.h @@ -23,13 +23,19 @@ namespace folly { // forward declaration +template +class SemiFuture; template class Future; +namespace futures { namespace detail { +template +class FutureBase; struct EmptyConstruct {}; template class CoreCallbackState; -} +} // namespace detail +} // namespace futures template class Promise { @@ -105,9 +111,14 @@ class Promise { private: typedef typename Future::corePtr corePtr; - template friend class Future; + template + friend class futures::detail::FutureBase; + template + friend class SemiFuture; + template + friend class Future; template - friend class detail::CoreCallbackState; + friend class futures::detail::CoreCallbackState; // Whether the Future has been retrieved (a one-time operation). bool retrieved_; @@ -115,14 +126,14 @@ class Promise { // shared core state object corePtr core_; - explicit Promise(detail::EmptyConstruct) noexcept; + explicit Promise(futures::detail::EmptyConstruct) noexcept; void throwIfFulfilled(); void throwIfRetrieved(); void detach(); }; -} +} // namespace folly #include #include