Go to the documentation of this file.
18 #ifndef GZ_PHYSICS_TEMPLATEHELPERS_HH_
19 #define GZ_PHYSICS_TEMPLATEHELPERS_HH_
21 #include <type_traits>
32 template <
class... T>
struct type { };
36 template <
typename...>
57 template <
typename To,
typename From>
60 template <
typename To,
typename From>
81 #define IGN_PHYSICS_CREATE_SELECTOR(X) \
82 template<typename InFeature> \
85 template<typename F, typename PolicyT, typename FeaturesT, \
86 typename = ::ignition::physics::void_t<>> \
87 struct Implementation \
89 using type = ::ignition::physics::Empty; \
92 template<typename F, typename PolicyT, typename FeaturesT> \
93 struct Implementation<F, PolicyT, FeaturesT, \
94 ::ignition::physics::void_t< \
95 typename F::template X <PolicyT, FeaturesT>>> \
97 using type = typename F::template X <PolicyT, FeaturesT>; \
100 template <typename PolicyT, typename FeaturesT> \
101 using type = typename Implementation<InFeature, PolicyT, FeaturesT>::type; \
Contains a static constexpr field named value which will be true if the type From has a const-quality...
Definition: gz/physics/TemplateHelpers.hh:58
This can be used to turn a type into a function argument, which is useful for template metaprogrammin...
Definition: gz/physics/TemplateHelpers.hh:32
Useful as a blank placeholder in template metaprogramming.
Definition: gz/physics/TemplateHelpers.hh:28
void void_t
Definition: gz/physics/TemplateHelpers.hh:37
Definition: gz/physics/TemplateHelpers.hh:61