Add strong reference to range objects #132

This commit is contained in:
Jason Turner
2014-08-30 13:36:36 -06:00
parent 3fe80d70c6
commit a71903f185
6 changed files with 61 additions and 9 deletions

View File

@@ -205,10 +205,25 @@ namespace chaiscript
static Result_Type cast(const Boxed_Value &ob, const Dynamic_Cast_Conversions *)
{
return ob;
return ob;
}
};
/**
* Cast_Helper_Inner for casting to a Boxed_Value & type
*/
template<>
struct Cast_Helper_Inner<Boxed_Value &>
{
typedef Boxed_Value& Result_Type;
static Result_Type cast(const Boxed_Value &ob, const Dynamic_Cast_Conversions *)
{
return const_cast<Boxed_Value &>(ob);
}
};
/**
* Cast_Helper_Inner for casting to a const Boxed_Value & type
*/