6template<
typename ElementType>
10 using uptr_t = std::unique_ptr<ElementType>;
20 m_member{ std::make_unique<ElementType>(value) } { }
25 template<
typename Type = const_lref_uptr_t>
28 return static_cast<Type
>(this->m_member);
36 dummy_t dummy{ 22.0 / 7.0 };
42 stream <<
"the value of the object that p1 is pointing to is "
45 stream <<
"The type of p1: "
48 auto& p2 = dummy.get_member<dummy_t::lref_uptr_t>();
50 stream <<
"the value of the object that p2 is pointing to is "
53 stream <<
"The type of p2: "
58 auto p3 = dummy.get_member<dummy_t::rref_uptr_t>();
60 stream <<
"the value of the object that p3 is pointing to is "
63 stream <<
"The type of p3: "
decltype(auto) get_member()
std::unique_ptr< ElementType > && rref_uptr_t
DummyClass(ElementType value=ElementType{})
std::unique_ptr< int > uptr_t
std::unique_ptr< ElementType > & lref_uptr_t
const std::unique_ptr< ElementType > & const_lref_uptr_t
Stream output operators << are implemented.
#define Tpf_GetTypeCategory(instance_arg)
A macro that returns instance_arg's type category string name.