#ifndef MEDIAPIPE_FRAMEWORK_API2_TUPLE_H_
#define MEDIAPIPE_FRAMEWORK_API2_TUPLE_H_
#include <tuple>
#include <type_traits>
#include <utility>
#include "absl/meta/type_traits.h"
namespace mediapipe {
namespace api2 {
namespace internal {
tuple_index_sequence;
template <std::size_t... I>
constexpr auto index_sequence_cat(std::index_sequence<I...>)
-> std::index_sequence<I...> { … }
template <std::size_t... I, std::size_t... J, class... Tail>
constexpr auto index_sequence_cat(std::index_sequence<I...>,
std::index_sequence<J...>, Tail... tail) { … }
template <template <typename...> class Pred, typename Tuple, std::size_t... I>
constexpr auto filtered_tuple_indices_impl(Tuple&& t,
std::index_sequence<I...>) { … }
template <template <typename...> class Pred, typename Tuple>
constexpr auto filtered_tuple_indices(Tuple&& tuple) { … }
template <typename T>
struct Wrap { … };
template <class F, typename Tuple, std::size_t... I>
constexpr auto filtered_tuple_indices_impl(Tuple&& t,
std::index_sequence<I...>) { … }
template <class F, typename Tuple>
constexpr auto filtered_tuple_indices(Tuple&& tuple) { … }
template <typename Tuple, std::size_t... I>
constexpr auto select_tuple_indices(Tuple&& tuple, std::index_sequence<I...>) { … }
template <template <typename...> class Pred, typename Tuple>
constexpr auto filter_tuple(Tuple&& t) { … }
template <typename F, typename Tuple>
constexpr auto filter_tuple(Tuple&& t) { … }
template <class F, class T, class I>
constexpr auto call_with_optional_index(F&& f, T&& t, I i)
-> absl::void_t<decltype(f(std::forward<T>(t), i))> { … }
template <class F, class T, class I>
constexpr auto call_with_optional_index(F&& f, T&& t, I i)
-> absl::void_t<decltype(f(std::forward<T>(t)))> { … }
template <class F, class Tuple, std::size_t... I>
constexpr void tuple_for_each_impl(F&& f, Tuple&& tuple,
std::index_sequence<I...>) { … }
template <class F, class Tuple>
constexpr void tuple_for_each(F&& f, Tuple&& tuple) { … }
template <class F, class Tuple, std::size_t... I>
constexpr auto map_tuple_impl(F&& f, Tuple&& tuple, std::index_sequence<I...>) { … }
template <class F, class Tuple>
constexpr auto map_tuple(F&& f, Tuple&& tuple) { … }
template <class F, class Tuple, std::size_t... I>
constexpr auto tuple_apply_impl(F&& f, Tuple&& tuple,
std::index_sequence<I...>) { … }
template <class F, class Tuple>
constexpr auto tuple_apply(F&& f, Tuple&& tuple) { … }
template <class F, class Tuple, std::size_t i = 0>
constexpr std::enable_if_t<i == std::tuple_size_v<std::decay_t<Tuple>>,
std::size_t>
tuple_find(F&& f, Tuple&& tuple) { … }
template <class F, class Tuple, std::size_t i = 0>
constexpr std::enable_if_t<i != std::tuple_size_v<std::decay_t<Tuple>>,
std::size_t>
tuple_find(F&& f, Tuple&& tuple) { … }
template <class Tuple>
constexpr auto flatten_tuple(Tuple&& tuple) { … }
}
}
}
#endif