17template <
typename...
Args>
20template <
typename Func,
typename...
Arg>
23template <
typename Func,
typename...
Arg>
72template <
bool Condition,
typename T>
75 return std::move(std::forward<T>(
arg));
77 return std::forward<T>(
arg);
81template <
typename T,
typename... List>
82inline constexpr auto kCount = (std::size_t{std::is_same_v<T, List> ? 1 : 0} + ...);
84template <
typename T,
typename...
Ts>
85inline constexpr auto kContains = (std::is_same_v<T, Ts> || ...);
87template <
typename T,
typename Tuple>
90template <
typename T,
typename...
Ts>
95template <
typename Tuple>
98template <
typename T,
typename...
Ts>
103template <
typename Tuple>
106template <
template <
typename>
typename F,
typename Tuple>
109template <
template <
typename>
typename F>
114template <
template <
typename>
typename F,
typename T>
116 using Type = std::conditional_t<F<T>::Value, std::tuple<T>, std::tuple<>>;
119template <
template <
typename>
typename F,
typename T,
typename...
Ts>
122 using PrevType =
typename Filter<F, std::tuple<
Ts...>>::Type;
128template <
typename Tuple>
141template <
typename T,
typename...
Ts>
144 using PrevType =
typename Unique<std::tuple<
Ts...>>::Type;
150template <
typename Tuple>
153template <
typename...
Ts>
158template <
typename Tuple>
166template <
typename...
Ts>
184template <std::
size_t FromIndex, std::
size_t ToIndex,
typename FromTuple,
typename ToTuple>
187template <std::size_t
ToIndex,
typename... From,
typename...
To>
189 static_assert(
sizeof...(From) >=
sizeof...(
To));
190 static constexpr std::size_t
Index() {
195template <std::size_t
FromIndex, std::size_t
ToIndex,
typename... From,
typename...
To>
197 static_assert(
sizeof...(From) >=
sizeof...(
To));
200 static constexpr std::size_t
Index() {
203 tail_t<std::tuple<
To...>>>::Index();
210template <std::
size_t FromIndex,
typename FromTuple,
typename ToTuple>
213template <
typename T,
typename Tuple>
216template <
typename T,
typename...
Ts>
218 static_assert(
sizeof...(Ts) > 0);
220 static constexpr std::size_t
Index() {
221 if constexpr (std::is_same_v<T,
head_t<
Ts...>>) {
229template <
typename T,
typename Tuple>
234 static_assert(!std::is_reference_v<T>,
"T cannot be V&, just use pointer or std::reference_wrapper");
235 static_assert(!std::is_const_v<T>,
"T cannot be const, because it's unnecessary");
236 static_assert(!std::is_volatile_v<T>,
"T cannot be volatile, because it's unnecessary");
237 static_assert(!
is_result_v<T>,
"T cannot be Result, because it's ambiguous");
239 static_assert(!
is_task_v<T>,
"T cannot be Task, because it's ambiguous");
240 static_assert(!std::is_same_v<T, std::exception_ptr>,
"T cannot be std::exception_ptr, because it's ambiguous");
241 static_assert(!std::is_same_v<T, Unit>,
"T cannot be Unit, because Unit for internal instead of void usage");
Contract< V, T > MakeContract()
Creates related future and promise.
constexpr bool is_waitable_v
typename detail::Head< Args... >::Type head_t
constexpr std::size_t index_of_v
constexpr bool is_result_v
typename detail::InstantiationType< Result, T >::Value result_value_t
typename detail::AsyncTypes< T >::Value async_value_t
constexpr bool is_invocable_v
decltype(auto) move_if(T &&arg) noexcept
typename detail::InstantiationTypes< Task, T >::Trait task_trait_t
typename WrapVoid< T >::Type wrap_void_t
constexpr bool is_combinator_input_v
typename Tail< Tuple >::Type tail_t
constexpr bool is_future_base_v
constexpr std::size_t translate_index_v
constexpr bool Check() noexcept
constexpr bool is_shared_future_base_v
std::remove_cv_t< std::remove_reference_t< T > > remove_cvref_t
typename detail::Invoke< Func, Arg... >::Type invoke_t
constexpr bool is_waitable_with_timeout_v
typename detail::InstantiationTypes< Task, T >::Value task_value_t
typename detail::AsyncTypes< T >::Trait async_trait_t
std::conditional_t< F< T >::Value, typename Prepend< T, PrevType >::Type, PrevType > Type
std::conditional_t< F< T >::Value, std::tuple< T >, std::tuple<> > Type
static constexpr std::size_t Index()
std::variant< Ts... > Type
std::tuple< T, Ts... > Type
static constexpr std::size_t Index()
static constexpr std::size_t Index()
std::conditional_t< kContains< T, Ts... >, PrevType, typename Prepend< T, PrevType >::Type > Type
std::variant< Ts... > Type