template<typename InFeature> \
struct Select ## X \
{ \
template<typename F, typename PolicyT, typename FeaturesT, \
typename = ::void_t<>> \
struct Implementation \
{ \
using type = ::Empty; \
}; \
\
template<typename F, typename PolicyT, typename FeaturesT> \
struct Implementation<F, PolicyT, FeaturesT, \
typename F::template X <PolicyT, FeaturesT>>> \
{ \
using type = typename F::template X <PolicyT, FeaturesT>; \
}; \
\
template <typename PolicyT, typename FeaturesT> \
using type = typename Implementation<InFeature, PolicyT, FeaturesT>::type; \
};
Use this macro to create an API "selector" for a custom class.
Features may define APIs for class types that are not anticipated ahead of time by the gz-physics library. When aggregating the API for that class from a set of features, the Aggregator must be given a Selector that can ignore features that don't mention the class (or else a compilation failure would occur).