I have the following C ++ code where I used the Eigen C ++ Library.
#include "Dense"
#include <iostream>
int main()
{
Eigen::MatrixXf x(10,10);
x.setRandom();
std::cout<<"x is ..\n"<<x<<std::endl;
return 0;
}
When I try g ++ with "-std = gnu ++ 11", it gives the following error.
In file included from /usr/include/c++/4.8/tuple:39:0,
from /usr/include/c++/4.8/functional:55,
from ../SP_ToolBox/ExternalLibraries/Eigen/Eigen/Core:153,
from ../SP_ToolBox/ExternalLibraries/Eigen/Eigen/Dense:1,
from test.cpp:1:
../SP_ToolBox/ExternalLibraries/Eigen/Eigen/array:8:4: error:
^
In file included from /usr/include/c++/4.8/functional:55:0,
from ../SP_ToolBox/ExternalLibraries/Eigen/Eigen/Core:153,
from ../SP_ToolBox/ExternalLibraries/Eigen/Eigen/Dense:1,
from test.cpp:1:
/usr/include/c++/4.8/tuple:885:33: error: ‘array’ was not declared in this scope
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
^
/usr/include/c++/4.8/tuple:885:44: error: wrong number of template arguments (2, should be 1)
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
^
/usr/include/c++/4.8/tuple:873:12: error: provided for ‘template<class> struct std::__is_tuple_like_impl’
struct __is_tuple_like_impl : false_type
^
/usr/include/c++/4.8/tuple:885:47: error: expected unqualified-id before ‘>’ token
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
It compiles fine if I remove the "-std = gnu ++ 11" option. My gcc version is 4.8.4 and the Eigen Library version is 3.2.10.
source
share