diff --git a/include/osgIntrospection/Reflection b/include/osgIntrospection/Reflection index 1025d9d4f..c4253a6ea 100644 --- a/include/osgIntrospection/Reflection +++ b/include/osgIntrospection/Reflection @@ -26,6 +26,7 @@ /// returning the Type object associated to the type of the given /// expression. #define typeof(type) osgIntrospection::Reflection::getType(extended_typeid< type >()) +#define typeofvalue(val) osgIntrospection::Reflection::getType(osgIntrospection::ExtendedTypeInfo(typeid(val), false, false)) namespace osgIntrospection { diff --git a/include/osgIntrospection/Value b/include/osgIntrospection/Value index 8424e4a4d..34183062d 100644 --- a/include/osgIntrospection/Value +++ b/include/osgIntrospection/Value @@ -303,7 +303,7 @@ namespace osgIntrospection virtual const Type* ptype() const { if (!static_cast *>(inst_)->_data) return 0; - return &typeof(typename remove_pointer::type); + return &typeofvalue(*static_cast *>(inst_)->_data); } virtual bool nullptr() const