28#ifndef RTTR_INSTANCE_H_
29#define RTTR_INSTANCE_H_
31#include "rttr/detail/base/core_prerequisites.h"
32#include "rttr/detail/misc/misc_type_traits.h"
33#include "rttr/detail/misc/data_address_container.h"
49 template<
typename T,
typename Tp = detail::decay_t<T>>
50 using decay_instance_t = detail::enable_if_t<!std::is_same<instance, Tp>::value &&
51 !std::is_same<variant, Tp>::value, T>;
76 template<typename T, typename Tp = decay_instance_t<T>>
85 template<typename Target_Type>
86 RTTR_INLINE Target_Type* try_convert() const RTTR_NOEXCEPT;
93 RTTR_INLINE
bool is_valid() const RTTR_NOEXCEPT;
100 explicit operator
bool() const RTTR_NOEXCEPT;
109 RTTR_INLINE
type get_type() const RTTR_NOEXCEPT;
128 RTTR_INLINE
instance get_wrapped_instance() const RTTR_NOEXCEPT;
147 RTTR_INLINE
type get_derived_type() const RTTR_NOEXCEPT;
152 detail::data_address_container m_data_container;
157#include "rttr/detail/impl/instance_impl.h"
The instance class is used for forwarding the instance of an object to invoke a property or method.
Definition: instance.h:48
instance() noexcept
Creates an invalid instance object.
The type class holds the type information for any arbitrary object.
Definition: type.h:171
The variant class allows to store data of any type and convert between these types transparently.
Definition: variant.h:198
Definition: access_levels.h:34