diff --git a/src/libslic3r/BoundingBox.cpp b/src/libslic3r/BoundingBox.cpp
index 10543fc95..7e88eb92d 100644
--- a/src/libslic3r/BoundingBox.cpp
+++ b/src/libslic3r/BoundingBox.cpp
@@ -160,14 +160,14 @@ template Vec3d BoundingBox3Base<Vec3d>::size() const;
 template <class PointType, typename APointsType> double BoundingBoxBase<PointType, APointsType>::radius() const
 {
     assert(this->defined);
-    return 0.5 * (this->max - this->min).cast<double>().norm();
+    return 0.5 * (this->max - this->min).template cast<double>().norm();
 }
 template double BoundingBoxBase<Point, Points>::radius() const;
 template double BoundingBoxBase<Vec2d>::radius() const;
 
 template <class PointType> double BoundingBox3Base<PointType>::radius() const
 {
-    return 0.5 * (this->max - this->min).cast<double>().norm();
+    return 0.5 * (this->max - this->min).template cast<double>().norm();
 }
 template double BoundingBox3Base<Vec3d>::radius() const;
 
diff --git a/src/libslic3r/Polyline.hpp b/src/libslic3r/Polyline.hpp
index 9ed5f2137..8766c6d86 100644
--- a/src/libslic3r/Polyline.hpp
+++ b/src/libslic3r/Polyline.hpp
@@ -161,7 +161,6 @@ inline void polylines_append(Polylines &dst, Polylines &&src)
 template<typename PointsType>
 inline void polylines_merge(PointsType &dst, bool dst_first, PointsType &&src, bool src_first)
 {
-    using PointType = typename PointsType::value_type;
     if (dst_first) {
         if (src_first)
             std::reverse(dst.begin(), dst.end());