X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FOptional.h;h=8f48010fbe447ae2b5f090b734261aba1eae0fe2;hb=3f4a8ae005738662fbbca4a85c959df2bf0d059b;hp=39abcc1c6db900ddc5a4118c0335dec55e115b98;hpb=2ca10eeefdc1231a20fb1cb75dc3e8d2c5fa70ba;p=folly.git diff --git a/folly/Optional.h b/folly/Optional.h index 39abcc1c..8f48010f 100644 --- a/folly/Optional.h +++ b/folly/Optional.h @@ -1,5 +1,5 @@ /* - * Copyright 2017 Facebook, Inc. + * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once /* @@ -61,10 +60,10 @@ #include #include -#include #include #include #include +#include namespace folly { @@ -87,7 +86,7 @@ typedef int detail::NoneHelper::*None; const None none = nullptr; -class OptionalEmptyException : public std::runtime_error { +class FOLLY_EXPORT OptionalEmptyException : public std::runtime_error { public: OptionalEmptyException() : std::runtime_error("Empty Optional cannot be unwrapped") {} @@ -645,12 +644,12 @@ detail::OptionalAwaitable } // namespace folly // This makes folly::Optional useable as a coroutine return type.. -FOLLY_NAMESPACE_STD_BEGIN +namespace std { namespace experimental { template struct coroutine_traits, Args...> { using promise_type = folly::detail::OptionalPromise; }; } // namespace experimental -FOLLY_NAMESPACE_STD_END +} // namespace std #endif // FOLLY_HAS_COROUTINES