15 #ifndef GRPC_CORE_LIB_PROMISE_RACE_H
16 #define GRPC_CORE_LIB_PROMISE_RACE_H
20 #include <type_traits>
22 #include "absl/types/variant.h"
28 namespace promise_detail {
31 template <
typename... Promises>
34 template <
typename Promise,
typename... Promises>
37 using Result = decltype(std::declval<Promise>()());
45 if (absl::holds_alternative<Pending>(
r)) {
60 template <
typename Promise>
63 using Result = decltype(std::declval<Promise>()());
76 template <
typename... Promises>
83 #endif // GRPC_CORE_LIB_PROMISE_RACE_H