Add support for automatic conversion between chaiscript functions and boost::function. Might merit some look to see how much overhead this adds.
This commit is contained in:
@@ -251,8 +251,21 @@ namespace chaiscript
|
||||
return Boxed_POD_Value(ob);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Cast_Helper for converting from Boxed_Value to Boxed_POD_Value
|
||||
*/
|
||||
template<>
|
||||
struct Cast_Helper<const Boxed_POD_Value>
|
||||
{
|
||||
typedef Boxed_POD_Value Result_Type;
|
||||
|
||||
static Result_Type cast(const Boxed_Value &ob)
|
||||
{
|
||||
return Boxed_POD_Value(ob);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user