Commit fe1ff9ef authored by Dylan Yudaken's avatar Dylan Yudaken Committed by Facebook Github Bot

correct usage of namespace std for coroutines_trait specialization

Summary: When specializing traits you should not use the libcpp inline std namespace, but rather the plain one.

Reviewed By: yfeldblum

Differential Revision: D6373787

fbshipit-source-id: d62ef9ccbf90c6f952db5f93f2377c920e68a809
parent f5edd7dc
......@@ -1519,13 +1519,13 @@ expected_detail::Awaitable<Value, Error>
}
} // namespace folly
// This makes folly::Optional<Value> useable as a coroutine return type..
FOLLY_NAMESPACE_STD_BEGIN
// This makes folly::Expected<Value> useable as a coroutine return type...
namespace std {
namespace experimental {
template <typename Value, typename Error, typename... Args>
struct coroutine_traits<folly::Expected<Value, Error>, Args...> {
using promise_type = folly::expected_detail::Promise<Value, Error>;
};
} // namespace experimental
FOLLY_NAMESPACE_STD_END
} // namespace std
#endif // FOLLY_HAS_COROUTINES
......@@ -645,12 +645,12 @@ detail::OptionalAwaitable<Value>
} // namespace folly
// This makes folly::Optional<Value> useable as a coroutine return type..
FOLLY_NAMESPACE_STD_BEGIN
namespace std {
namespace experimental {
template <typename Value, typename... Args>
struct coroutine_traits<folly::Optional<Value>, Args...> {
using promise_type = folly::detail::OptionalPromise<Value>;
};
} // namespace experimental
FOLLY_NAMESPACE_STD_END
} // namespace std
#endif // FOLLY_HAS_COROUTINES
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