#pragma once // tuple utils #include namespace meta { template typename Wrap> struct tuple_wrap; template typename Wrap> using tuple_wrap_t = typename tuple_wrap::type; template using tuple_cat_t = decltype(std::tuple_cat(std::declval()...)); template struct tuple_join; template using tuple_join_t = typename tuple_join::type; template consteval std::size_t index_in_tuple() { if constexpr (Index == std::tuple_size_v) { return Index; // 如果没有找到,返回元组的大小作为标志 } else if constexpr (std::is_same_v>) { return Index; // 找到匹配的类型,返回当前索引 } else { return index_in_tuple(); // 递归检8查下一个索引 } } template constexpr uint8_t index_in_tuple_v = index_in_tuple(); template constexpr auto tuple_construct(const std::tuple&) noexcept; }