Fix dispatch for const boost::shared_ptr<> & parameters for functions, add a test to example.cpp and fix some issues with building example.cpp

This commit is contained in:
Jason Turner
2009-08-20 21:35:56 +00:00
parent 8840f06053
commit a136236179
4 changed files with 23 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ namespace chaiscript
functor(const std::vector<std::pair<std::string, Proxy_Function > > &funcs)
{
FunctionType *p=0;
return build_function_caller_helper(p, funcs);
return detail::build_function_caller_helper(p, funcs);
}
/**

View File

@@ -30,7 +30,7 @@ namespace chaiscript
* value of a build_function_caller
*/
template<typename Ret>
class Function_Caller_Ret
struct Function_Caller_Ret
{
static Ret call(const std::vector<std::pair<std::string, Proxy_Function > > &t_funcs,
const std::vector<Boxed_Value> &params)

View File

@@ -106,6 +106,18 @@ namespace chaiscript
}
};
template<typename T>
struct Get_Type_Info<const boost::shared_ptr<T> &>
{
static Type_Info get()
{
return Type_Info(boost::is_const<T>::value, boost::is_reference<T>::value, boost::is_pointer<T>::value,
boost::is_void<T>::value,
&typeid(const boost::shared_ptr<T> &),
&typeid(typename boost::remove_const<typename boost::remove_pointer<typename boost::remove_reference<T>::type>::type>::type));
}
};
template<typename T>
struct Get_Type_Info<boost::reference_wrapper<T> >
{