error: template argument 1 is invalid
error: expected primary-expression before '>' token
error: 'density' was not declared in this scope
What would be a right implementation of my "feature"? "ftype" can't be include in the "Tensor" definition, because sometimes I would like to create a "Tensor<int>"
Preprocessor statements, like #define, do not have a semicolon (;) at the end of them. Your code is essentially translating to this: Tensor<doube;> density;
I recommend using typedef instead: typedefdouble ftype;