summaryrefslogtreecommitdiff
path: root/matlab/src/Util.h
diff options
context:
space:
mode:
Diffstat (limited to 'matlab/src/Util.h')
-rw-r--r--matlab/src/Util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/matlab/src/Util.h b/matlab/src/Util.h
index 73e942dd896..836cd4aec38 100644
--- a/matlab/src/Util.h
+++ b/matlab/src/Util.h
@@ -45,4 +45,10 @@ mxArray* createByteArray(const Ice::Byte*, const Ice::Byte*);
std::string idToClass(const std::string&);
+template<typename T>
+std::shared_ptr<T> deref(void* p)
+{
+ return *reinterpret_cast<std::shared_ptr<T>*>(p);
+}
+
}