Add array type support #167

This commit is contained in:
Jason Turner
2015-04-17 20:02:09 -06:00
parent f3090c3857
commit 71245aa703
6 changed files with 64 additions and 4 deletions

View File

@@ -40,7 +40,8 @@ namespace chaiscript
{
if (ob.get_type_info().bare_equal_type_info(typeid(Result)))
{
return *(static_cast<const Result *>(throw_if_null(ob.get_const_ptr())));
auto p = throw_if_null(ob.get_const_ptr());
return std::cref(*static_cast<const Result *>(p));
} else {
throw chaiscript::detail::exception::bad_any_cast();
}