From c07c2a9cc2e6e05290c33810cb601912748f96b6 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 28 Mar 2016 15:57:26 -0600 Subject: [PATCH] Make sure type_info works with shared_ptr & --- include/chaiscript/dispatchkit/type_info.hpp | 5 +++++ unittests/shared_ptr_update.chai | 1 + 2 files changed, 6 insertions(+) diff --git a/include/chaiscript/dispatchkit/type_info.hpp b/include/chaiscript/dispatchkit/type_info.hpp index c91a444..c43767a 100644 --- a/include/chaiscript/dispatchkit/type_info.hpp +++ b/include/chaiscript/dispatchkit/type_info.hpp @@ -162,6 +162,11 @@ namespace chaiscript } }; + template + struct Get_Type_Info &> : Get_Type_Info> + { + }; + template struct Get_Type_Info &> { diff --git a/unittests/shared_ptr_update.chai b/unittests/shared_ptr_update.chai index 6378be6..cf7432a 100644 --- a/unittests/shared_ptr_update.chai +++ b/unittests/shared_ptr_update.chai @@ -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());