diff --git a/libsrc/core/archive.hpp b/libsrc/core/archive.hpp index d7546060..839fbdc6 100644 --- a/libsrc/core/archive.hpp +++ b/libsrc/core/archive.hpp @@ -77,7 +77,8 @@ namespace ngcore { template T* construct_from_tuple(Tuple&& tuple, std::index_sequence ) { - return new T{std::get(std::forward(tuple))...}; + // return new T{std::get(std::forward(tuple))...}; + return new T{std::get(std::move(tuple))...}; } template diff --git a/libsrc/core/register_archive.hpp b/libsrc/core/register_archive.hpp index b7be05d9..8005a196 100644 --- a/libsrc/core/register_archive.hpp +++ b/libsrc/core/register_archive.hpp @@ -34,6 +34,8 @@ namespace ngcore { return *this; } + /* + // now using has_shared_from_this2 in archive.hpp template struct has_shared_from_this { @@ -42,6 +44,7 @@ namespace ngcore { typedef decltype( check(sizeof(char)) ) type; static constexpr type value = type(); }; + */ #endif // NETGEN_PYTHON @@ -59,7 +62,7 @@ namespace ngcore { { detail::TCargs args; ar &args; - auto nT = detail::constructIfPossible(args); + auto nT = detail::constructIfPossible(std::move(args)); return typeid(T) == ti ? nT : Archive::Caster::tryUpcast(ti, nT); };