函数模板重载操作符小于号会报错找不到函数定义

为何编译器会报找不到函数定义的错误呢?即使说两个<可能与左移位符冲突,但是改为<=也是一样报错说找不到函数定义,如果是>则不会报错,这其中是什么原因呢?

#include 
#include 

using namespace std;

template<typename T> class test;

template<typename T>
bool operator < (const test& t1, const test& t2) {
        return t1.t < t2.t;
}

template<typename T>
class test {
        friend bool operator < (const test& t1, const test& t2);
public:
        test(const T& t):t(t){}
private:
        T t;
};

int main()
{
        test<intt1(1)t2(2);
        cout << (t1 < t2);
}

img