15#ifndef FASTDDS_DDS_XTYPES_DYNAMIC_TYPES_DETAIL__TYPE_TRAITS_HPP
16#define FASTDDS_DDS_XTYPES_DYNAMIC_TYPES_DETAIL__TYPE_TRAITS_HPP
20#include <fastdds/fastdds_dll.hpp>
29 using ref_type = typename ::std::shared_ptr<T>;
32 template<
typename _Tp,
typename =
typename
33 std::enable_if<std::is_base_of<T, _Tp>::value>::type>
34 inline static std::shared_ptr<_Tp>
narrow (
37 return std::dynamic_pointer_cast<_Tp>(obj);
47 using ref_type = typename ::std::shared_ptr<T>;
50 template<
typename _Tp,
typename =
typename
51 std::enable_if<std::is_base_of<T, _Tp>::value>::type>
52 inline static std::shared_ptr<_Tp>
narrow (
55 return std::dynamic_pointer_cast<_Tp>(obj);
Definition DomainParticipant.hpp:45
Definition type_traits.hpp:46
typename ::std::shared_ptr< T > ref_type
Definition type_traits.hpp:47
typename ::std::weak_ptr< T > weak_ref_type
Definition type_traits.hpp:48
static std::shared_ptr< _Tp > narrow(ref_type obj)
Definition type_traits.hpp:52
Definition type_traits.hpp:28
typename ::std::shared_ptr< T > ref_type
Definition type_traits.hpp:29
typename ::std::weak_ptr< T > weak_ref_type
Definition type_traits.hpp:30
static std::shared_ptr< _Tp > narrow(ref_type obj)
Definition type_traits.hpp:34
static FASTDDS_EXPORTED_API std::shared_ptr< T > make_shared()