Make sure type_info works with shared_ptr &

This commit is contained in:
Jason Turner 2016-03-28 15:57:26 -06:00
parent 46c45e8fc7
commit c07c2a9cc2
2 changed files with 6 additions and 0 deletions

View File

@ -162,6 +162,11 @@ namespace chaiscript
}
};
template<typename T>
struct Get_Type_Info<std::shared_ptr<T> &> : Get_Type_Info<std::shared_ptr<T>>
{
};
template<typename T>
struct Get_Type_Info<const std::shared_ptr<T> &>
{

View File

@ -10,6 +10,7 @@ assert_false(o.is_var_null());
assert_true(o.base_only_func() == -9);
nullify_shared_ptr(o);
o.nullify_shared_ptr();
assert_true(o.is_var_null());