Several tests and fixes related to type conversions added. Still more to go.

This commit is contained in:
Jason Turner
2010-10-08 15:18:58 +00:00
parent c3da778103
commit 3f87210dc5
5 changed files with 112 additions and 74 deletions

View File

@@ -242,28 +242,16 @@ namespace chaiscript
* Cast_Helper for converting from Boxed_Value to Boxed_POD_Value
*/
template<>
struct Cast_Helper<const Boxed_POD_Value &>
struct Cast_Helper<const Boxed_POD_Value &> : Cast_Helper<Boxed_POD_Value>
{
typedef Boxed_POD_Value Result_Type;
static Result_Type cast(const Boxed_Value &ob)
{
return Boxed_POD_Value(ob);
}
};
/**
* Cast_Helper for converting from Boxed_Value to Boxed_POD_Value
*/
template<>
struct Cast_Helper<const Boxed_POD_Value>
struct Cast_Helper<const Boxed_POD_Value> : Cast_Helper<Boxed_POD_Value>
{
typedef Boxed_POD_Value Result_Type;
static Result_Type cast(const Boxed_Value &ob)
{
return Boxed_POD_Value(ob);
}
};
}