From 585296d527ed06921eca5b259f9ba70f8a0abcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 3 May 2020 18:24:32 +0200 Subject: [PATCH] Fix issue with shared pointer being registered twice. --- src/runner/pythonrunner.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index a00ca9e..4b16fb9 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -772,11 +772,17 @@ template struct DowncastReturn { template - struct apply { - static_assert(std::is_convertible_v>); + struct apply_; + + template + struct apply_> { + static_assert(std::is_convertible_v, std::shared_ptr>); using type = DowncastConverter; }; + template + using apply = apply_>; + }; @@ -927,7 +933,7 @@ BOOST_PYTHON_MODULE(mobase) Functor_converter const&)>(); // FileTreeEntry Scope: - auto fileTreeEntryClass = bpy::class_, boost::noncopyable>("FileTreeEntry", bpy::no_init); + auto fileTreeEntryClass = bpy::class_("FileTreeEntry", bpy::no_init); { bpy::scope scope = fileTreeEntryClass;