Go to the documentation of this file.
28 #ifndef RTTR_RTTR_ENABLE_H_
29 #define RTTR_RTTR_ENABLE_H_
31 #include <type_traits>
34 #include "rttr/detail/misc/misc_type_traits.h"
41 template<
typename... U>
struct type_list;
85 #define RTTR_ENABLE(...)
89 #define TYPE_LIST(...) rttr::detail::type_list<__VA_ARGS__>
91 #define RTTR_ENABLE(...) \
93 virtual RTTR_INLINE rttr::type get_type() const { return rttr::detail::get_type_from_instance(this); } \
94 virtual RTTR_INLINE void* get_ptr() { return reinterpret_cast<void*>(this); } \
95 virtual RTTR_INLINE rttr::detail::derived_info get_derived_info() { return {reinterpret_cast<void*>(this), rttr::detail::get_type_from_instance(this)}; } \
96 using base_class_list = TYPE_LIST(__VA_ARGS__); \
101 #endif // RTTR_RTTR_ENABLE_H_