28#include <boost/mp11.hpp>
29#include <boost/preprocessor.hpp>
45template <
class T1,
class T2>
46using mp_neq = boost::mp11::mp_bool<T1::value != T2::value>;
53template <
class AllList,
class L>
54using mp_flt = boost::mp11::mp_filter_q<boost::mp11::mp_bind_front<mp_neq, boost::mp11::mp_size<AllList>>, L>;
61template <
class AllList,
class L>
68#define KNP_MAKE_TUPLE_INTERNAL(n, tuple_type, tuple_elem) (BOOST_PP_STRINGIZE(tuple_elem))
73#define KNP_MAKE_TUPLE(tuple_elems) \
75 BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_FOR_EACH(KNP_MAKE_TUPLE_INTERNAL, "", BOOST_PP_VARIADIC_TO_SEQ(tuple_elems))));
83template <
typename AllTypes,
typename SupportedTypes>
86 std::vector<size_t> result;
87 result.reserve(boost::mp11::mp_size<SupportedTypes>::value);
89 boost::mp11::mp_for_each<knp::meta::mp_supported_indexes<SupportedTypes, AllTypes>>([&result](
auto i)
90 { result.push_back(i); });
103template <
typename AllTypes,
typename SupportedTypes,
typename NamesType>
106 std::vector<std::string> result;
107 result.reserve(boost::mp11::mp_size<SupportedTypes>::value);
109 boost::mp11::mp_for_each<knp::meta::mp_supported_indexes<SupportedTypes, AllTypes>>(
110 [&type_names, &result](
auto i) { result.push_back(std::get<i>(type_names)); });