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