C++ Template operator overload
I'm writing a template matrix class, and I am a bit confused as to how overloading the * operator would work. I would want to overload something like this (omitting irrelevant code): template<typename T>class Matrix4t { friend vector3 operator*(const vector3 &inputV3, const matrix4t &inputM4t); template <typename scalarT> friend scalarT operator*(const scalarT &inputSclT, const matrix4t &inputM4t); public: const matrix4t operator*(const matrix4t) vector3 operator*(const vector3 &inputV3); template <typename scalarT> const matrix4t operator*(const scalarT&); } Assuming correct definitions for