RTC Toolkit 4.0.1
Loading...
Searching...
No Matches
utils.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_UTILS_HPP
14#define RTCTK_COMPONENTFRAMEWORK_UTILS_HPP
15
16#include <type_traits>
17
19
20// This is to check for dependencies between feature layers
21
22template <template <typename...> class Base, typename Derived>
23struct is_base_of_template_impl { // NOLINT(readability-identifier-naming)
24 template <typename... Ts>
25 // NOLINTNEXTLINE(readability-identifier-naming)
26 static constexpr std::true_type test(const Base<Ts...> *);
27 // NOLINTNEXTLINE(readability-identifier-naming)
28 static constexpr std::false_type test(...);
29 using type = decltype(test(std::declval<Derived *>()));
30};
31
32template <template <typename...> class Base, typename Derived>
34
35template <template <typename...> class Base, typename Derived>
36// NOLINTNEXTLINE(readability-identifier-naming)
38
39} // namespace rtctk::componentFramework
40
41#endif // RTCTK_COMPONENTFRAMEWORK_UTILS_HPP
Definition: commandReplier.cpp:22
typename is_base_of_template_impl< Base, Derived >::type is_base_of_template
Definition: utils.hpp:33
constexpr bool is_base_of_template_v
Definition: utils.hpp:37
decltype(test(std::declval< Derived * >())) type
Definition: utils.hpp:29
static constexpr std::false_type test(...)
static constexpr std::true_type test(const Base< Ts... > *)