diff --git a/src/libslic3r/TriangleMesh.hpp b/src/libslic3r/TriangleMesh.hpp index 1fc512893..5dd2597a5 100644 --- a/src/libslic3r/TriangleMesh.hpp +++ b/src/libslic3r/TriangleMesh.hpp @@ -196,6 +196,7 @@ TriangleMesh make_sphere(double rho, double fa=(2*PI/360)); } // Serialization through the Cereal library +#include namespace cereal { template struct specialize {}; template void load(Archive &archive, Slic3r::TriangleMesh &mesh) { diff --git a/src/slic3r/Utils/UndoRedo.cpp b/src/slic3r/Utils/UndoRedo.cpp index d5da0c618..ca40c6939 100644 --- a/src/slic3r/Utils/UndoRedo.cpp +++ b/src/slic3r/Utils/UndoRedo.cpp @@ -555,7 +555,8 @@ template std::shared_ptr& ImmutableObjectHistory::share std::istringstream iss(m_serialized); { Slic3r::UndoRedo::InputArchive archive(stack, iss); - std::unique_ptr::type> mesh(new std::remove_const::type()); + typedef typename std::remove_const::type Type; + std::unique_ptr mesh(new Type()); archive(*mesh.get()); m_shared_object = std::move(mesh); }