TemplateMetaProgrammingBoost.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <boost/shared_ptr.hpp>
6 
7 #include <memory>
8 
9 namespace armarx::meta
10 {
11  template<class T, class = void>
12  struct pointer_type_traits : std::false_type {};
13 
14  template<class T>
15  struct pointer_type_traits<T*, void> : std::true_type
16  {
17  using pointee_t = T;
18  };
19 
20  template<class T>
22  T,
23  std::enable_if_t<TypeTemplateTraits::IsInstanceOfAnyV<T, boost::shared_ptr, std::shared_ptr, std::unique_ptr>>
24  > : std::true_type
25  {
26  using pointee_t = typename T::element_type;
27  };
28 
29  template<class T>
30  static constexpr bool is_pointer_type_v = pointer_type_traits<T>::value;
31 
32  template<class T>
34 }
armarx::meta::pointer_type_traits< T *, void >::pointee_t
T pointee_t
Definition: TemplateMetaProgrammingBoost.h:17
TemplateMetaProgramming.h
armarx::meta
Definition: PluginCfgStruct.h:31
armarx::meta::pointer_type_traits< T, std::enable_if_t< TypeTemplateTraits::IsInstanceOfAnyV< T, boost::shared_ptr, std::shared_ptr, std::unique_ptr > > >::pointee_t
typename T::element_type pointee_t
Definition: TemplateMetaProgrammingBoost.h:26
std
Definition: Application.h:66
T
float T
Definition: UnscentedKalmanFilterTest.cpp:35
armarx::meta::pointer_type_traits
Definition: TemplateMetaProgrammingBoost.h:12
armarx::meta::pointer_type_pointee_t
typename pointer_type_traits< T >::pointee_t pointer_type_pointee_t
Definition: TemplateMetaProgrammingBoost.h:33