#include "../src/Core.h" USING_EIGEN_DATA_TYPES using namespace std; template void foo(const Eigen::Object& m) { cout << "Here's m:" << endl << m << endl; } template Eigen::ScalarProduct twice(const Eigen::Object& m) { return 2 * m; } int main(int, char**) { Matrix2d m; m(0,0)= 1; m(1,0)= 2; m(0,1)= 3; m(1,1)= 4; foo(m); foo(twice(m)); return 0; }