title: Compiler Errors when using Eigen Library with MSVC2015
body: <p>I need to use matricies for a program I am writing, so I downloaded and installed Eigen, however, upon compiling my project my error log is absolutely flooded with errors, all of which seem to be coming from the Eigen files themselves, here is  my error log:</p>
  
  <pre><code>1&gt;------ Build started: Project: ailib, Configuration: Debug Win32 ------
  1&gt;  NeuralNet.cpp
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(52): error C2039: 'ReturnType': is not a member of 'Eigen::internal::scalar_product_traits&lt;LhsScalar,RhsScalar&gt;'
  1&gt;          with
  1&gt;          [
  1&gt;              LhsScalar=float,
  1&gt;              RhsScalar=Eigen::internal::result_of&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt; (float,float)&gt;::type
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\util\meta.h(161): note: see reference to class template instantiation 'Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\cwisebinaryop.h(58): note: see reference to class template instantiation 'Eigen::internal::result_of&lt;BinaryOp (float,bool)&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt; (float,float)&gt;::type&gt;
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\cwisebinaryop.h(165): note: see reference to class template instantiation 'Eigen::internal::traits&lt;Derived&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              Derived=Eigen::CwiseBinaryOp&lt;Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt; (float,float)&gt;::type&gt;,const Eigen::ArrayWrapper&lt;Eigen::Matrix&lt;float,-1,1,0,-1,1&gt;&gt;,const Eigen::CwiseBinaryOp&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;,const Eigen::CwiseNullaryOp&lt;Eigen::internal::scalar_constant_op&lt;float&gt;,Eigen::Array&lt;float,-1,1,0,-1,1&gt;&gt;,const Eigen::ArrayWrapper&lt;Eigen::Matrix&lt;float,-1,1,0,-1,1&gt;&gt;&gt;&gt;
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\cwisebinaryop.h(112): note: see reference to class template instantiation 'Eigen::CwiseBinaryOpImpl&lt;BinaryOp,Lhs,Rhs,Eigen::Dense&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt; (float,float)&gt;::type&gt;,
  1&gt;              Lhs=Eigen::ArrayWrapper&lt;Eigen::Matrix&lt;float,-1,1,0,-1,1&gt;&gt;,
  1&gt;              Rhs=Eigen::CwiseBinaryOp&lt;Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;,const Eigen::CwiseNullaryOp&lt;Eigen::internal::scalar_constant_op&lt;float&gt;,Eigen::Array&lt;float,-1,1,0,-1,1&gt;&gt;,const Eigen::ArrayWrapper&lt;Eigen::Matrix&lt;float,-1,1,0,-1,1&gt;&gt;&gt;
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\ailib\neuralnet.cpp(51): note: see reference to class template instantiation 'Eigen::CwiseBinaryOp&lt;Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;,const Derived,const Eigen::CwiseBinaryOp&lt;BinaryOp,const Eigen::CwiseNullaryOp&lt;Eigen::internal::scalar_constant_op&lt;float&gt;,Eigen::Array&lt;float,-1,1,0,-1,1&gt;&gt;,const Derived&gt;&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;,
  1&gt;              Derived=Eigen::ArrayWrapper&lt;Eigen::Matrix&lt;float,-1,1,0,-1,1&gt;&gt;
  1&gt;          ]
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(52): error C3646: 'result_type': unknown override specifier
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(54): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(54): error C2143: syntax error: missing ';' before '('
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(54): error C2433: 'Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;::result_type': '__forceinline' not permitted on data declarations
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;
  1&gt;          ]
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(59): error C2327: 'Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;::result_type': is not a type name, static, or enumerator
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;
  1&gt;          ]
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(59): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(59): error C2433: 'result_type': '__forceinline' not permitted on data declarations
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(59): error C2365: 'Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;::result_type': redefinition; previous definition was 'data member'
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;
  1&gt;          ]
  1&gt;  c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(54): note: see declaration of 'Eigen::internal::scalar_product_op&lt;float,Eigen::internal::result_of&lt;BinaryOp (float,float)&gt;::type&gt;::result_type'
  1&gt;          with
  1&gt;          [
  1&gt;              BinaryOp=Eigen::internal::scalar_cmp_op&lt;float,Eigen::internal::cmp_LT&gt;
  1&gt;          ]
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(59): error C2061: syntax error: identifier 'predux'
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(61): error C2143: syntax error: missing ';' before '}'
  1&gt;c:\users\rick simone\documents\aioli\ailib\eigen\eigen\src\core\functors.h(61): error C2238: unexpected token(s) preceding ';'
  </code></pre>
  
  <p>The problem is, when I go to the files and lines indicated by the errors, they are in the Eigen source code (Which I haven't modified or touched), the snippet where all the errors come from is as follows:</p>
  
  <pre><code>template&lt;typename LhsScalar,typename RhsScalar&gt; struct scalar_product_op {
    enum {
      // TODO vectorize mixed product
      Vectorizable = is_same&lt;LhsScalar,RhsScalar&gt;::value &amp;&amp; packet_traits&lt;LhsScalar&gt;::HasMul &amp;&amp; packet_traits&lt;RhsScalar&gt;::HasMul
    };
    typedef typename scalar_product_traits&lt;LhsScalar,RhsScalar&gt;::ReturnType result_type;
    EIGEN_EMPTY_STRUCT_CTOR(scalar_product_op)
    EIGEN_STRONG_INLINE const result_type operator() (const LhsScalar&amp; a, const RhsScalar&amp; b) const { return a * b; }
    template&lt;typename Packet&gt;
    EIGEN_STRONG_INLINE const Packet packetOp(const Packet&amp; a, const Packet&amp; b) const
    { return internal::pmul(a,b); }
    template&lt;typename Packet&gt;
    EIGEN_STRONG_INLINE const result_type predux(const Packet&amp; a) const
    { return internal::predux_mul(a); }
  };
  </code></pre>
  
  <p>Includes used:<br>
      <code>#include &lt;Eigen\Core&gt;</code><br>
      <code>#include &lt;Eigen\Dense&gt;</code></p>
  
  <p>Line 51 NeuralNet.cpp:  <code>err = errIn.array() * (m_layerOut.array() &gt; 0.f);</code></p>
  
  <p>Types of Variables: err, errIn and m_layerOut are all <code>Eigen::Matrix&lt;float, Eigen::Dynamic, 1&gt;</code></p>
  
  <p>Thanks in advance!</p>