diff --git a/include/chaiscript/dispatchkit/boxed_cast.hpp b/include/chaiscript/dispatchkit/boxed_cast.hpp index c86b4e1..31d9386 100644 --- a/include/chaiscript/dispatchkit/boxed_cast.hpp +++ b/include/chaiscript/dispatchkit/boxed_cast.hpp @@ -86,7 +86,7 @@ namespace chaiscript #pragma warning(disable : 4127) #endif - if (std::is_polymorphic>::value && t_conversions) + if (std::is_polymorphic::type>::value && t_conversions) { try { // std::cout << "trying an up conversion " << typeid(Type).name() << std::endl; diff --git a/include/chaiscript/dispatchkit/type_info.hpp b/include/chaiscript/dispatchkit/type_info.hpp index afa9e9e..628b4bb 100644 --- a/include/chaiscript/dispatchkit/type_info.hpp +++ b/include/chaiscript/dispatchkit/type_info.hpp @@ -16,8 +16,15 @@ namespace chaiscript { - template - using Bare_Type = typename std::remove_cv::type>::type>::type; + namespace detail + { + template + struct Bare_Type + { + typedef typename std::remove_cv::type>::type>::type type; + }; + } + /// \brief Compile time deduced information about a type class Type_Info @@ -145,7 +152,7 @@ namespace chaiscript std::is_void::value, std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(T), - &typeid(Bare_Type)); + &typeid(typename Bare_Type::type)); } }; @@ -160,7 +167,7 @@ namespace chaiscript std::is_void::value, std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(std::shared_ptr ), - &typeid(Bare_Type)); + &typeid(typename Bare_Type::type)); } }; @@ -175,7 +182,7 @@ namespace chaiscript std::is_void::value, std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(const std::shared_ptr &), - &typeid(Bare_Type)); + &typeid(typename Bare_Type::type)); } }; @@ -190,7 +197,7 @@ namespace chaiscript std::is_void::value, std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(std::reference_wrapper ), - &typeid(Bare_Type)); + &typeid(typename Bare_Type::type)); } }; @@ -205,7 +212,7 @@ namespace chaiscript std::is_void::value, std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(const std::reference_wrapper &), - &typeid(Bare_Type)); + &typeid(typename Bare_Type::type)); } };