#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::ScalarMultiple twice(const Eigen::Object& m) { return 2 * m; } int main(int, char**) { Matrix2d m = Matrix2d::random(); foo(m); foo(twice(m)); return 0; }