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:
Jason Turner
2010-09-13 14:24:12 +00:00
parent cfa42158af
commit 10986c159f
6 changed files with 143 additions and 28 deletions

View File

@@ -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);
}
};
}
}