There are classes:
namespace gmath { template<class T, size_t s> class alignas(s) Vector3 : public _Vector<T> { public: template<class T1, size_t s> friend Vector3<T1, s> operator*(const Matrix3<T1, 64>& m, const Vector3<T1, s>& v); // здесь члены и другие объявления } template<class T, size_t s> class alignas(s) Matrix3 : public _Matrix<T, 3> { // здесь объявления и члены } } And there is an implementation of the above declared method:
template<class T1, size_t s> Vector3<T1, s> gmath::operator*(const Matrix3<T1, 64>& m, const Vector3<T1, s>& v) { // здесь код } I am writing in Visual Studio 2017, when using this operator, the studio shows that it is overloaded and finds it. But when compiling I get this:
Error C2244 operator *: unable to match function definition to existing declaration
The error indicates exactly this method. MSDN said that when using templates, you should check the implementation mapping carefully ... I looked, I did not find it. Where to dig?