diff options
-rwxr-xr-x | system/include/emscripten/bind.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/include/emscripten/bind.h b/system/include/emscripten/bind.h index 56a3b62c..3f857a2a 100755 --- a/system/include/emscripten/bind.h +++ b/system/include/emscripten/bind.h @@ -902,6 +902,11 @@ namespace emscripten { return std::shared_ptr<InterfaceType>(ip); } + template<class ConcreteWrapperType> + static std::shared_ptr<ConcreteWrapperType> cloneToSharedWrapperPtr(InterfaceType& i) { + return std::dynamic_pointer_cast<ConcreteWrapperType>(cloneToSharedPtr<ConcreteWrapperType>(i)); + } + void initialize(internal::EM_VAL handle) { if (jsobj) { internal::_embind_fatal_error( |