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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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> ¶ms)
|
||||
|
@@ -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> >
|
||||
{
|
||||
|
Reference in New Issue
Block a user