Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by yohan ( 15 years ago )
namespace {
template<typename T>
void call_member(const luabind::object& self,
const std::string& eventName,
const T& object,
const boost::false_type& /* isPOD */) {
luabind::call_member<void>(self, "FireEvent", eventName, boost::ref(object));
}
template<typename T>
void call_member(const luabind::object& self,
const std::string& eventName,
const T& object,
const boost::true_type& /* isPOD */) {
luabind::call_member<void>(self, "FireEvent", eventName, object);
}
};
call_member<T>(self, eventName, object, typename boost::mpl::if_c<boost::is_POD<T>::value,
boost::true_type,
boost::false_type>::type());
Revise this Paste