title: error C2338: YOU_MIXED_DIFFERENT_NUMERIC_TYPES
body: <p>I'm receiving this error at line eigen/src/Core/AssignEvaluator.h(834) of <a href="http://eigen.tuxfamily.org/" rel="nofollow noreferrer">Eigen</a> library:</p>
  <blockquote>
  <p>error C2338: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY</p>
  </blockquote>
  <p>Based on the compiler logs I think the errors is triggered by this line in the code:</p>
  <pre><code>class IndexedMesh {
      
      const TriangleMesh* m_tm;
  
      // ...
  }
  
  Vec3d IndexedMesh::normal_by_face_id(int face_id) const {
      return m_tm-&gt;normal_by_face_id(face_id); // =&gt; Error is thrown here
  }
  
  Vec3f TriangleMesh::normal_by_face_id(int face_id) const
  {
      return Vec3f();
  }
  </code></pre>
  <p>Complete compiler log is this:</p>
  <pre><code>c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/AssignEvaluator.h(834): error C2338: YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY
  c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/PlainObjectBase.h(732): note: see reference to function template instantiation 'void Eigen::internal::call_assignment_no_alias&lt;Derived,Eigen::Matrix&lt;float,3,1,2,3,1&gt;,Eigen::internal::assign_op&lt;double,float&gt;&gt;(Dst &amp;,const Src &amp;,const Func &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;double,3,1,2,3,1&gt;,
              Dst=Eigen::Matrix&lt;double,3,1,2,3,1&gt;,
              Src=Eigen::Matrix&lt;float,3,1,2,3,1&gt;,
              Func=Eigen::internal::assign_op&lt;double,float&gt;
          ]
  c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/PlainObjectBase.h(537): note: see reference to function template instantiation 'Derived &amp;Eigen::PlainObjectBase&lt;Derived&gt;::_set_noalias&lt;Eigen::Matrix&lt;float,3,1,2,3,1&gt;&gt;(const Eigen::DenseBase&lt;Eigen::Matrix&lt;float,3,1,2,3,1&gt;&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;double,3,1,2,3,1&gt;
          ]
  c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/PlainObjectBase.h(537): note: see reference to function template instantiation 'Derived &amp;Eigen::PlainObjectBase&lt;Derived&gt;::_set_noalias&lt;Eigen::Matrix&lt;float,3,1,2,3,1&gt;&gt;(const Eigen::DenseBase&lt;Eigen::Matrix&lt;float,3,1,2,3,1&gt;&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;double,3,1,2,3,1&gt;
          ]
  c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/Matrix.h(378): note: see reference to function template instantiation 'Eigen::PlainObjectBase&lt;Eigen::Matrix&lt;double,3,1,2,3,1&gt;&gt;::PlainObjectBase&lt;Derived&gt;(const Eigen::DenseBase&lt;Derived&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;float,3,1,2,3,1&gt;
          ]
  c:\users\m3\repos\qt3d-editor\editorlib\deps\eigen\eigen\src/Core/Matrix.h(377): note: see reference to function template instantiation 'Eigen::PlainObjectBase&lt;Eigen::Matrix&lt;double,3,1,2,3,1&gt;&gt;::PlainObjectBase&lt;Derived&gt;(const Eigen::DenseBase&lt;Derived&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;float,3,1,2,3,1&gt;
          ]
  ..\..\qt3d-editor\editorlib\src\libslic3r\SLA\IndexedMesh.cpp(119): note: see reference to function template instantiation 'Eigen::Matrix&lt;double,3,1,2,3,1&gt;::Matrix&lt;Derived&gt;(const Eigen::EigenBase&lt;Derived&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;float,3,1,2,3,1&gt;
          ]
  ..\..\qt3d-editor\editorlib\src\libslic3r\SLA\IndexedMesh.cpp(119): note: see reference to function template instantiation 'Eigen::Matrix&lt;double,3,1,2,3,1&gt;::Matrix&lt;Derived&gt;(const Eigen::EigenBase&lt;Derived&gt; &amp;)' being compiled
          with
          [
              Derived=Eigen::Matrix&lt;float,3,1,2,3,1&gt;
          ]
  </code></pre>