Go to the documentation of this file.
19 #define MAKE_GETTER_DETECTOR(GETTER) \
22 template<typename T> \
23 struct GETTER##_getter_traits \
25 template<typename U> \
26 static constexpr std::true_type test_has(std::void_t<decltype(std::declval<U>().GETTER())> * = nullptr); \
27 template<typename U> \
28 static constexpr std::false_type test_has(...); \
29 static constexpr bool has = decltype(test_has<T>(0))::value; \
30 template<typename U> \
31 static auto test(std::void_t<decltype(std::declval<const U>().GETTER())> * = nullptr) \
32 -> decltype(std::declval<const U>().GETTER()); \
33 template<typename U> \
34 static void test(...); \
35 using type = decltype(test<T>(0)); \
38 template<typename T> \
39 inline constexpr bool has_##GETTER##_getter_v = impl::GETTER##_getter_traits<T>::has; \
40 template<typename T> \
41 using GETTER##_return_t = typename impl::GETTER##_getter_traits<T>::type
43 #define MAKE_SETTER_DETECTOR(SETTER) \
46 template<typename T> \
47 struct has_##SETTER##_setter \
49 template<typename U> \
50 static constexpr std::true_type test( \
51 std::void_t<decltype(std::declval<U>().SETTER(std::declval<Eigen::VectorXd>()))> * = nullptr); \
52 template<typename U> \
53 static constexpr std::false_type test(...); \
54 static constexpr bool value = decltype(test<T>(0))::value; \
57 template<typename T> \
58 inline constexpr bool has_##SETTER##_setter_v = impl::has_##SETTER##_setter<T>::value
66 inline constexpr
bool has_refVel_v = has_refVel_getter_v<T> && has_refVel_setter_v<T>;
69 inline constexpr
bool has_refAccel_v = has_refAccel_getter_v<T> && has_refAccel_setter_v<T>;
74 #undef MAKE_GETTER_DETECTOR
75 #undef MAKE_SETTER_DETECTOR
MAKE_GETTER_DETECTOR(refVel)
MAKE_SETTER_DETECTOR(refVel)
constexpr bool has_refAccel_v
Definition: tasks_traits.h:69
constexpr bool always_false_v
Definition: tasks_traits.h:72
constexpr bool has_refVel_v
Definition: tasks_traits.h:66
Definition: StabilizerStandingState.h:11