Changeset 15103 for lang/cplusplus/reflection/trunk/memrebuild.hpp
- Timestamp:
- 07/03/08 16:13:48 (5 months ago)
- Files:
-
- 1 modified
-
lang/cplusplus/reflection/trunk/memrebuild.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/reflection/trunk/memrebuild.hpp
r14745 r15103 119 119 120 120 #undef MEM_REBUILD_ 121 122 template <typename T, typename TI> T core(const void *p, TI t) 121 122 template <typename T, typename TI> 123 typename builder<T>::func_t get_instantiator(TI t) 123 124 { 124 typedef mem_rebuild_ns::builder_map<T> map; 125 for (typename map::const_iterator i = map::m.begin(); 126 i != map::m.end(); 125 for (typename builder_map<T>::const_iterator i = builder_map<T>::m.begin(); 126 i != builder_map<T>::m.end(); 127 127 ++i) { 128 128 typename mem_rebuild_ns::builder<T>::func_t instantiate; 129 129 if ((instantiate = (*i)->get(t)) != NULL) 130 return (*instantiate)(p);130 return instantiate; 131 131 } 132 132 throw std::bad_cast(); 133 } 134 135 template <typename T, typename TI> T core(const void *p, TI t) 136 { 137 return (*get_instantiator<T, TI>(t))(p); 133 138 } 134 139
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)