mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 08:46:53 +08:00
Make sure type_info works with shared_ptr &
This commit is contained in:
parent
46c45e8fc7
commit
c07c2a9cc2
@ -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>
|
template<typename T>
|
||||||
struct Get_Type_Info<const std::shared_ptr<T> &>
|
struct Get_Type_Info<const std::shared_ptr<T> &>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,6 +10,7 @@ assert_false(o.is_var_null());
|
|||||||
assert_true(o.base_only_func() == -9);
|
assert_true(o.base_only_func() == -9);
|
||||||
|
|
||||||
nullify_shared_ptr(o);
|
nullify_shared_ptr(o);
|
||||||
|
o.nullify_shared_ptr();
|
||||||
|
|
||||||
assert_true(o.is_var_null());
|
assert_true(o.is_var_null());
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user