3 #include <cgv/type/cond/is_base_of.h>
4 #include <cgv/type/cond/is_standard_type.h>
5 #include "reflection_traits.h"
6 #include "reflect_config.h"
11 template <
bool is_self,
typename T>
12 struct reflection_traits_info_self
14 static T* get_dummy_ptr() {
return 0; }
15 static const bool use_get =
true;
16 #ifdef REFLECT_TRAITS_WITH_DECLTYPE
17 typedef decltype(get_reflection_traits(*get_dummy_ptr())) traits_type;
25 struct reflection_traits_info_self<true,T>
28 static const bool use_get =
false;
29 typedef reflection_traits<T, RTK_SELF_REFLECT, false> traits_type;
32 template <
bool is_std,
typename T>
33 struct reflection_traits_info_std :
public reflection_traits_info_self<cgv::type::cond::is_base_of<self_reflection_tag, T>::value, T> {};
36 struct reflection_traits_info_std<true,T>
39 static const bool use_get =
false;
40 typedef reflection_traits<T, RTK_STD_TYPE, true> traits_type;
60 #include <cgv/config/lib_end.h>