Microsoft Visual C++ 2008 Template Deduction bug

Back to programming

template <int N>
class Vector
{
};

template <int M, int N>
class Matrix
{
};

template <int M, int N>
Vector<N> operator*(const Vector<M>& other,
                    const Matrix<M + 1, N>& that)
{
    return Vector<N>();
}

int main()
{
    Vector<3> a;
    Matrix<4, 4> m;

    a * m;

    return 0;
}