Boost hana get index of first matching
问题 So I am trying to make a library using boost::hana that requires the functionality to get the index of a element based on the value: constexpr auto tup = boost::hana::make_tuple(3_c, boost::hana::type_c<bool>); auto index = get_index_of_first_matching(tup, boost::hana::type_c<bool>); // ^^^^^ would be a boost::hana::int_<1> Is there a possible way to do this? Better yet, is it already in hana and I don't know about it? Thanks for the support! 回答1: Hana does not provide an algorithm to do this